Get Detection Model Learning Curve

Returns the metrics for each epoch in a model that has a modelType of image-detection. These metrics show you the f1 score, recall, precision, and so on for each training iteration performed to create the model.

Object detection models are available in Einstein Vision API version 2.0 and later.

Response Body

Name

Type

Description

Available Version

data

array

Array of learningcurve objects.

2.0

object

string

Object returned; in this case, list.

2.0

learningCurve Response Body

Name

Type

Description

Available Version

epoch

int

Epoch to which the metrics correspond.

2.0

epochResults

object

N/A

2.0

metricsData

object

Model metrics values.

2.0

object

string

Object returned; in this case, learningcurve.

2.0

metricsData Response Body

Name

Type

Description

Available Version

labelMetrics

array

Array that contains the metrics for each label in the model.

2.0

classMetrics Response Body

Name

Type

Description

Available Version

averagePrecision

float

Average precision for the specified label. This value is computed from the validation data. The PASCAL VOC 2012 method is used to compute the average precision, also known as [email protected] When no examples for a label appear in the validation data, this value returns null.

2.0

label

string

Label for which the metrics are returned.

2.0

f1

array

The weighted average of precision and recall for the specified label. This value is computed from the validation data.

2.0

precision

array

Array of precision values used to compute the average precision. The precision array hasn't been preprocessed to be monotonically non-increasing. The precision and recall arrays can be used to draw the precision-recall curve.

2.0

recall

array

Array of recall values used to compute the average precision.

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 uses a default number of epochs. 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 30 epochs. Using the learning curve data for the resulting model, you might see that the most accurate results for that dataset are in the 23rd 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).

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

count

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

offset

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.

Language