Details for performing analysis with Nylon.

All analysis techniques can be specified under the analysis keyword in your specifications file. If the analysis tag is not provided in the specifications file, both cross-validation and accuracy score will be calculated on your model.

"analysis": {

Analysis Vocabulary

cross-val: Performs cross validation on the training dataset and returns each folds performance. You can modify the number of folds with the spec parameter. The default number is 5.

"analysis": {
"spec": 5

acc-score: Accuracy classification score on the testing set. Note that the set of labels predicted for a sample must exactly match the corresponding set of labels in y_true.

Confusion Matrix

confusion: Compute confusion matrix to evaluate the accuracy of a classification.

Precision & Recall

pr: Calculates the precision and recall on the testing dataset. Both of these metrics are a measure of success of prediction when the classes are very imbalanced.

Custom Analysis

Finally, custom analysis functions are also supported. They should take in four parameters in this order:




Paraglide's specifications file

Pandas DataFrame

Your training dataset

Scikit-Learn Model

Fitted model you want to analyze

Label Data

Label data for testing.


"analysis" :
"custom": {
"loc": "sample",
"name": "analyze_func"