KFoldValidation#
- class KFoldValidation(config)#
Bases:
Classifier
The k-fold validation
Classifier
wrapper executes the specifiedClassifier
into the k-fold validation principle. Based on the results of the k unseen test sets it creates the necessary files for the metrics and confusion matrix in the AI Studio Validation screens.Note - The stored model is based on all input data, k-fold validation is only produced for the metrics
Input - Since it is a wrapper step check the used
Classifier
Output - Since it is a wrapper step check the used
Classifier
- Parameters
Example
{ "step": "classifier", "type": "kfold" "k": 5, "label_field": "label", "output_field": "prediction", "output_path": "./ml_results.json", "classifier_params": { "step": "classifier", "type": "cosine_similarity", "input_fields": ["embedded_extract"], "output_field": "prediction", "label_field": "label", } }
Methods Summary
process
(docs)Process a set of documents
train
(docs)Train on a step of a set of documents
Methods Documentation
- process(docs)#
Process a set of documents