Class: Rumale::EvaluationMeasure::MeanAbsoluteError
- Inherits:
-
Object
- Object
- Rumale::EvaluationMeasure::MeanAbsoluteError
- Includes:
- Base::Evaluator
- Defined in:
- rumale-evaluation_measure/lib/rumale/evaluation_measure/mean_absolute_error.rb
Overview
MeanAbsoluteError is a class that calculates the mean absolute error.
Instance Method Summary collapse
-
#score(y_true, y_pred) ⇒ Float
Calculate mean absolute error.
Instance Method Details
#score(y_true, y_pred) ⇒ Float
Calculate mean absolute error.
22 23 24 |
# File 'rumale-evaluation_measure/lib/rumale/evaluation_measure/mean_absolute_error.rb', line 22 def score(y_true, y_pred) (y_true - y_pred).abs.mean end |