isanet.metrics

Metrics Module.

isanet.metrics.accuracy_binary(y_true, y_pred)

Accuracy classification score.

Parameters
  • y_true (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Ground truth (correct) target values.

  • y_pred (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Estimated target values.

Returns

loss – A non-negative floating point value (the best value is 100.0)

Return type

float

isanet.metrics.mee(y_true, y_pred)

Mean Euclidean error regression loss

Parameters
  • y_true (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Ground truth (correct) target values.

  • y_pred (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Estimated target values.

Returns

loss – A non-negative floating point value (the best value is 0.0)

Return type

float

isanet.metrics.mse(y_true, y_pred)

Mean squared error regression loss

Parameters
  • y_true (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Ground truth (correct) target values.

  • y_pred (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Estimated target values.

Returns

loss – A non-negative floating point value (the best value is 0.0)

Return type

float

isanet.metrics.mse_reg(y_true, y_pred, model, weights)

MSE + L2 regularization

Parameters
  • y_true (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Ground truth (correct) target values.

  • y_pred (array-like of shape (n_samples,) or (n_samples, n_outputs)) – Estimated target values.

  • model (isanet.model.MLP) –

  • weights (list) – List of arrays, the ith array represents all the weights of each neuron in the ith layer.

Returns

loss – A non-negative floating point value (the best value is 0.0)

Return type

float