Training Your Collection

Notice – All publicly available Indico APIs will be deprecated on Jan 1, 2020

Once you’ve added the desired data to your Collection, all you need to do is train and you’ll be ready to analyze!

You’ll see in the code to the right of your screen how simple it is to train a Collection. However, you should keep in mind whether you’d like your code to wait until the model is trained or not. The following block is the status returned by .train().

{
    'model_type': 'classification',
    'input_type': 'image',
    'number_of_examples': 4000,
    'permissions': {'read': [], 'write': []},
    'public': False,
    'registered': False,
    'status': 'training'
}

Adding .wait() will block until the training is complete. Otherwise you’ll need to check the status (which we’ll show you how to do below) of your new Collection separately and make sure it’s ready before using it in analysis.

Since Collection training is resource intensive, each call to `train` is counted as 100 API calls regardless of your Collection size.

Arguments for Training

The model_type argument
Optional argument for single and multi-label collections. One of ‘standard’, ‘tfidf’, or ‘ensemble’. Defaults to ‘standard’.

The oversample argument
Optional argument for single and multi-label collections. Set to true if your data is class imbalanced and performance on rare classes matters. Defaults to false.

The max_oversampling_ratio argument
Optional argument for single and multi-label collections. The maximum amount of duplication via oversampling. Defaults to 20.

The selection_metric argument
Optional argument for single and multi-label collections. Metric used to select best model hyperparameters. One of ‘class_accuracy’, ‘multiclass_roc_auc’, or ‘f1_score’. Defaults to ‘class_accuracy’.

The model_version argument
Optional argument for annotation collections. One of ‘v2’, ‘v3’. Defaults to ‘v2’.

The timeout argument
Optional argument for annotation collections. Max number of seconds to wait for convergence before stopping model training early. Defaults to 600.

// Train Collection
sendToIndico('custom/train', {});

// Without a client library you'll have to manually check the status of your collection