Validation Report
Validation reports are generated to evaluate the model's quality. So rather than writing functions on your own, we can use this report to quickly understand how the models perform.
A validation report is a markdown report with various phases that explain the model's various abilities from which we can infer it's real-world performance.
How to access the feature?
Parameters required for initialization
Not all the parameters are required for creating an object. Initialize only the parameters that will be required for the routine you need.
predicted
Data Series
The prediction made by the model
actual
Data Series
The actual ground truth value used to evaluate the model.
weight
Array
The weight of the model
data
Data Frame
The feature data of the model whose columns were used for training
predicted_probability
Data Series
The probability of label 1 prediction
two_class_probability
Data Frame
The probability of both the classes
pearson_threshold
Int - Optional
A number to determine the pearson threshold you need
vif_factor
Int - Optional
A number to determine the vif threshold you need
cat_columns
List
The name of categorical columns in the dataframe
markdown_report
Boolean
True to generate a markdown report
print_report
Boolean
True to print the report
cluster_centroids
Data Series
The cluster labels predicted by the model
cluster_k_values
List
The different k values you may need if you want to train a model
cluster_train
Boolean
True to train a model
All parameters are set to None by default, and if any parameters are missing for a specific routine, you will receive an error message indicating that a parameter is missing.
Routines
Routines are used to generate different validation reporting structure which depends upon the type of mode you use.
The routines that are available in Sanatio with their respective function calls are
Binary logistic regression routine
binary_logistic_regression_routine()
Linear regression routine
linear_regression_routine()
Tree based classification routine
tree_based_classification_routine()
How to validate the model?
Import the ValidationRoutine class from sanatio.validations.
Create the validation object and initialize with required parameters as per your model.
Call the specific routine function you need
Example
Last updated