metrax.RMSLE#
- class metrax.RMSLE(total: Array, count: Array)#
Bases:
MSLEComputes the root mean squared logarithmic error for regression problems given predictions and labels.
The root mean squared logarithmic error is defined as:
\[RMSLE = \sqrt{\frac{1}{N} \sum_{i=1}^{N} (ln(y_i + 1) - ln(\hat{y}_i + 1))^2 }\]- where:
\(y_i\) are true values
\(\hat{y}_i\) are predictions
\(N\) is the number of samples
Methods
__init__(total, count)compute()Computes final metrics from intermediate values.
compute_value()Wraps compute() and returns a values.Value.
empty()Returns an empty instance (i.e. .merge(Metric.empty()) is a no-op).
from_fun(fun)Calls cls.from_model_output with the return value from fun.
from_model_output(predictions, labels[, ...])Updates the metric.
from_output(name)Calls cls.from_model_output with model output named name.
merge(other)Returns Metric that is the accumulation of self and other.
reduce()Reduces the metric along it first axis by calling _reduce_merge().
replace(**updates)Returns a new object replacing the specified fields with new values.
Attributes
totalcount- compute() Array#
Computes final metrics from intermediate values.
- replace(**updates)#
Returns a new object replacing the specified fields with new values.