Returns the metrics for each epoch in a model that has a modelType
of image-multi-label
. These metrics show you the f1 score, accuracy, confusion matrix, test accuracy, and so on for each training iteration performed to create the model.
Multi-label models are available in Einstein Vision API version 2.0 and later.
Response Body
Name | Type | Description | Available Version |
---|---|---|---|
| array | Array of | 2.0 |
| string | Object returned; in this case, | 2.0 |
learningCurve Response Body
Name | Type | Description | Available Version |
---|---|---|---|
| int | Epoch to which the metrics correspond. | 2.0 |
| object | Prediction results for the set of data used to test the model during training. | 2.0 |
| object | Model metrics values. | 2.0 |
| string | Object returned; in this case, | 2.0 |
metricsData Response Body
Name | Type | Description | Available Version |
---|---|---|---|
| object | This object contains:
Use this field to build a binary confusion matrix for each label in the model. | 2.0 |
| array | Array of float arrays that contains the weighted average of precision and recall for each label in the dataset. The corresponding label for each value in this array can be found in the | 2.0 |
| array | Array of strings that contains the dataset labels. These labels correspond to the values in the | 2.0 |
| array | Array of floats that specify the accuracy of the test data for each label. From your initial dataset, by default, 10% of the data is set aside and isn't used during training to create the model. This 10% is then sent to the model for prediction. How often the correct prediction is made with this 10% is reported for each label in the | 2.0 |
| array | Array of floats that specify the accuracy of the training data for each label. By default, 90% of the data from your dataset is left after the test accuracy set is set aside. This 90% is then sent to the model for prediction. How often the correct prediction is made with this 90% is reported for each label in the | 2.0 |
epochResults Response Body
Name | Type | Description | Available Version |
---|---|---|---|
| string | Example name, followed by a hyphen, and the expected label. For example, | 2.0 |
| string | Image label provided when the dataset (used to create the model) was created. | 2.0 |
| string | Label that the model predicted for the example | 2.0 |
You can use the learning curve data to see how a model performed in each training iteration. This information helps you tune your model and identify the optimal number of epochs to specify when you train a dataset.
When you train a dataset, you can specify the number of epochs used to create the model, or if you don't specify any epochs, the training call selects a number of epochs based on the dataset data. In each epoch, machine learning happens behind the scenes to create the model. Information from an epoch is passed into the next epoch, from that epoch to the next, and so on.
When it comes to epochs, more isn't always better. For example, you could train a dataset and specify five epochs. Using the learning curve data for the resulting model, you might see that the most accurate results for that dataset are in the third epoch. You can use the learning curve data to see if your model is overfit (model predicts accurately with training data but not unseen data) or underfit (model doesn't predict accurately with training data or unseen data).
For information about correlating the confusion matrix values and the labels, see Get Multi-Label Model Metrics.
Use the Epoch Results to Tune the Model
Use the epochResults
values to better understand the testAccuracy
number the model returns for each epoch. For example, if testAccuracy
is 1, then each example in the set of test examples was predicted correctly. But if testAccuracy
is .5, then you can look at the epochResults
to see for which test data the model returned incorrect predictions.
Query Parameters
By default, this call returns 25 epochs. To page through the epochs for a model, use the offset
and count
query parameters.
Name | Description | Available Version |
---|---|---|
| Number of epochs to return. Maximum valid value is 25. If you specify a number greater than 25, the call returns 25 epochs. Optional. | 1.0 |
| Index of the epoch from which you want to start paging. Optional. | 1.0 |
Here's an example of these query parameters. If you omit the count
parameter, the API returns 25 epochs. If you omit the offset
parameter, paging starts at 0.
curl -X GET -H "Authorization: Bearer <TOKEN>" -H "Cache-Control: no-cache" "https://api.einstein.ai/v2/vision/models/7JPFL6UKMHUEJLHJ6FEX4YBV4U/lc?offset=30&count=10"
For example, let's say you want to page through all of the model epochs and show 10 at a time. The first call would have offset=0
and count=10
, the second call would have offset=10
and count=10
, and so on.