KFoldValidation

class squirro.lib.nlp.steps.classifiers.KFoldValidation(config)

Bases: squirro.lib.nlp.steps.classifiers.Classifier

K-Fold Validation

Parameters
  • type (str) – kfold

  • classifier (str) – model to be used

  • classifier_params (dict, {}) – params

  • k (int, 5) – DS splitting parameter

  • output_path (str) – k-fold output path

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

Parameters

docs (generator(Document)) – Generator of documents

Returns

Generator of processed documents

Return type

generator(Document)

train(docs)

Train on a step of a set of documents

Parameters

docs (generator(Document)) – Generator of documents

Returns

Generator of processed documents

Return type

generator(Document)