Explaining Predictions

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

Valid for Image, Classification, and MultiLabel collections.

Predict the most likely class or set of labels for a new document, and additionally return
the training examples that are most similar to your new document.

collection.explain('text')
{
    'class_confidence': {'label-1': 0.0145, 'label-2': 0.9855},
    'confidence': 0.9855,
    'explanation': [
        {'data': 'text', 'metadata': {}, 'prediction': ['label-2'], 'similarity': 0.6942, 'target': ['label-2']},
        {'data': 'text', 'metadata': {}, 'prediction': ['label-2'], 'similarity': 0.6881, 'target': ['label-2']},
        {'data': 'text', 'metadata': {}, 'prediction': ['label-2'], 'similarity': 0.6859, 'target': ['label-2']}
    ], 
    'prediction': 'label-2'
}