megnet.utils.metrics module

metrics for evaluating datasets

accuracy(y_true: numpy.ndarray, y_pred: numpy.ndarray) float[source]

Simple accuracy calculation

Parameters
  • y_true – numpy array of 0 and 1’s

  • y_pred – numpy array of predict sigmoid

Returns

(float) accuracy

mae(y_true: numpy.ndarray, y_pred: numpy.ndarray) float[source]

Simple mean absolute error calculations

Parameters
  • y_true – (numpy array) ground truth

  • y_pred – (numpy array) predicted values

Returns

(float) mean absolute error