turicreate.image_classifier.ImageClassifier.classify

ImageClassifier.classify(dataset, batch_size=64)

Return a classification, for each example in the dataset, using the trained logistic regression model. The output SFrame contains predictions as both class labels (0 or 1) as well as probabilities that the predicted value is the associated label.

Parameters:
dataset : SFrame | SArray | turicreate.Image

Images to be classified. If dataset is an SFrame, it must include columns with the same names as the features used for model training, but does not require a target column. Additional columns are ignored.

batch_size : int, optional

If you are getting memory errors, try decreasing this value. If you have a powerful computer, increasing this value may improve performance.

Returns:
out : SFrame

An SFrame with model predictions i.e class labels and probabilities. If dataset is a single image, the return will be a single row (dict).

See also

create, evaluate, predict

Examples

>>> classes = model.classify(data)