Metrics

metrics.mean_absolute_error(y_true, y_pred)[source]

Compute average absolute error score of a classification.

Parameters
  • y_true (2d array-like) – Ground truth (correct) labels expressed as image.

  • y_pred (2d array-like) – Predicted labels, as returned by the NN

Returns

score – Average absolute error between the two inputs

Return type

float

metrics.mean_accuracy_score(y_true, y_pred)[source]

Compute average accuracy score of a classification.

Parameters
  • y_true (2d array-like) – Ground truth (correct) labels expressed as image.

  • y_pred (2d array-like) – Predicted labels, as returned by the NN

Returns

score – Average accuracy between the two inputs

Return type

float

metrics.mean_hellinger(y_true, y_pred)[source]

Compute average hellinger score of a classification.

Parameters
  • y_true (2d array-like) – Ground truth (correct) labels expressed as image.

  • y_pred (2d array-like) – Predicted labels, as returned by the NN

Returns

score – Average hellinger error between the two inputs

Return type

float

metrics.mean_iou_score(y_true, y_pred)[source]

Compute average IoU score of a classification. IoU is computed as Intersection Over Union between true and predict labels.

It’s a tipical metric in segmentation problems, so we encourage to use it when you are dealing image processing tasks.

Parameters
  • y_true (2d array-like) – Ground truth (correct) labels expressed as image.

  • y_pred (2d array-like) – Predicted labels, as returned by the NN

Returns

score – Average IoU between the two inputs

Return type

float

metrics.mean_logcosh(y_true, y_pred)[source]

Compute average logcosh score of a classification.

Parameters
  • y_true (2d array-like) – Ground truth (correct) labels expressed as image.

  • y_pred (2d array-like) – Predicted labels, as returned by the NN

Returns

score – Average logcosh error between the two inputs

Return type

float

metrics.mean_square_error(y_true, y_pred)[source]

Compute average square error score of a classification.

Parameters
  • y_true (2d array-like) – Ground truth (correct) labels expressed as image.

  • y_pred (2d array-like) – Predicted labels, as returned by the NN

Returns

score – Average square error between the two inputs

Return type

float