Model Inference#

After fitting your database, you can perform predictions using your model.

>>> preds = j.predict(name, DATA_ITEM)
>>> print(preds)

[{"id":0, "predict": "class1"}, {"id":1, "predict": "class0"}]

If you trained a classification model, you can have the probabilities for each class.

>>> preds = j.predict(name, DATA_ITEM, predict_proba=True)
>>> print(preds)

[{"id": 0 , "predict"; {"class0": 0.1, "class1": 0.6, "class2": 0.3}}]


The method predict has a default batch_size=2**20, which will result in ceil(n_samples/batch_size) + 2 requests. We DON’T recommend changing the default value as it could reduce the performance of the API.