Class: Rumale::EvaluationMeasure::MeanSquaredLogError
- Inherits:
-
Object
- Object
- Rumale::EvaluationMeasure::MeanSquaredLogError
- Includes:
- Base::Evaluator
- Defined in:
- rumale-evaluation_measure/lib/rumale/evaluation_measure/mean_squared_log_error.rb
Overview
MeanSquaredLogError is a class that calculates the mean squared logarithmic error.
Instance Method Summary collapse
-
#score(y_true, y_pred) ⇒ Float
Calculate mean squared logarithmic error.
Instance Method Details
#score(y_true, y_pred) ⇒ Float
Calculate mean squared logarithmic error.
22 23 24 |
# File 'rumale-evaluation_measure/lib/rumale/evaluation_measure/mean_squared_log_error.rb', line 22 def score(y_true, y_pred) ((Numo::NMath.log(y_true + 1) - Numo::NMath.log(y_pred + 1))**2).mean end |