$darkmode
Functions | |
template<std::floating_point T, std::input_iterator I, std::input_iterator J> | |
auto | r2_score (I first1, std::sentinel_for< I > auto last1, J first2) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J, std::input_iterator K> | |
auto | r2_score (I first1, std::sentinel_for< I > auto last1, J first2, K first3) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J> | |
auto | mean_squared_error (I first1, std::sentinel_for< I > auto last1, J first2) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J, std::input_iterator K> | |
auto | mean_squared_error (I first1, std::sentinel_for< I > auto last1, J first2, K first3) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J> | |
auto | mean_squared_log_error (I first1, std::sentinel_for< I > auto last1, J first2) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J, std::input_iterator K> | |
auto | mean_squared_log_error (I first1, std::sentinel_for< I > auto last1, J first2, K first3) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J> | |
auto | mean_absolute_error (I first1, std::sentinel_for< I > auto last1, J first2) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J, std::input_iterator K> | |
auto | mean_absolute_error (I first1, std::sentinel_for< I > auto last1, J first2, K first3) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J> | |
auto | mean_absolute_percentage_error (I first1, std::sentinel_for< I > auto last1, J first2) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J, std::input_iterator K> | |
auto | mean_absolute_percentage_error (I first1, std::sentinel_for< I > auto last1, J first2, K first3) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J> | |
auto | poisson_neg_likelihood_loss (I first1, std::sentinel_for< I > auto last1, J first2) noexcept -> double |
template<std::floating_point T, std::input_iterator I, std::input_iterator J, std::input_iterator K> | |
auto | poisson_neg_likelihood_loss (I first1, std::sentinel_for< I > auto last1, J first2, K first3) noexcept -> double |
Regression metrics (R2, MSE, MLSE, MAE).
|
inlinenoexcept |
Computes the mean absolute error.
\[ \text{MAE}(y, \hat{y}) = \displaystyle \frac{1}{n} {\sum_{i=1}^n |y-\hat{y}|} \]
|
inlinenoexcept |
Weighted mean absolute error.
\[ \text{MAE}(y, \hat{y}) = \displaystyle \frac{1}{\sum_{i=1}^n w_i} \sum_{i=1}^n w_i |y-\hat{y}| \]
|
inlinenoexcept |
Computes the mean absolute error.
T | \[ \text{MAPE}(y, \hat{y}) = \frac{1}{n} \sum_{i=1}^{n} \frac{{}\left| y_i - \hat{y}_i \right|}{\max(\epsilon, \left| y_i \right|)} \] where \(\epsilon\) =std::numeric_limits<T>::epsilon() is an arbitrarily small constant to prevent division by zero. |
|
inlinenoexcept |
Weighted mean absolute percentage error.
\[ \text{WMAPE}(y, \hat{y}) = \displaystyle \frac{1}{\sum_i^n w_i} \frac{\sum_{i=1}^n w_i |y-\hat{y}|}{\max(\epsilon, \left| y_i \right|)} \]
|
inlinenoexcept |
Computes the mean squared error.
\[ \text{MSE}(y, \hat{y}) = \displaystyle \frac{1}{n} {\sum_{i=1}^n \left(y-\hat{y}\right)^2} \]
|
inlinenoexcept |
Computes the weighted mean squared error.
\[ \text{MSE}(y, \hat{y}) = {\displaystyle \frac{1}{\sum_{i=1}^n w_i}} \sum_{i=1}^n w_i \left(y-\hat{y}\right)^2 \]
|
inlinenoexcept |
Computes the mean squared logarithmic error.
\[ \text{MSLE}(y, \hat{y}) = \frac{1}{n} \sum_{i=1}^{n} (\log_e (1 + y_i) - \log_e (1 + \hat{y}_i) )^2 \]
|
inlinenoexcept |
Computes the weighted mean squared logarithmic error.
\[ \text{MSLE}(y, \hat{y}) = \frac{1}{\sum_{i=1}^n w_i} \sum_{i=1}^{n} w_i (\log_e (1 + y_i) - \log_e (1 + \hat{y}_i) )^2 \]
|
inlinenoexcept |
Negative log likelihood loss with Poisson distribution of target.
\[ -\log\mathcal{L}_\text{poisson}(y, \hat{y}) = \hat{y} - y \cdot \log(\hat{y}) + \ln(|\Gamma(y)|) \]
where \(\Gamma(y)\) is returned by eve::gamma_p.
|
inlinenoexcept |
Negative log likelihood loss with Poisson distribution of target. The mean in each bin is multiplied by a weight before the Poisson likelihood is applied.
\[ -\log\mathcal{L}_\text{poisson}(y, w \cdot \hat{y}) = \hat{y} - y \cdot \log(\hat{y}) + \ln(|\Gamma(y)|) \]
where \(\Gamma(y)\) is returned by eve::gamma_p.
|
inlinenoexcept |
Computes the coefficient of determination \(R^2\).
T | The scalar value type underlying the eve::wide<T> SIMD type used to compute the stats |
\begin{align} R^2(y, \hat{y}) &= 1 - \frac{\text{RSS}}{\text{TSS}}\text{, where}\\ \text{RSS} &= \sum_{i=1}^n \left( y - \hat{y} \right)^2\\ \text{TSS} &= \sum_{i=1}^n \left( y - \bar{y} \right)^2\\ \end{align}
|
inlinenoexcept |
Computes the weighted coefficient of determination \(R^2\).
\begin{align} R^2(y, \hat{y}) &= 1 - \frac{\text{RSS}}{\text{TSS}}\text{, where}\\ \text{RSS} &= \sum_{i=1}^n w_i \left( y - \hat{y} \right)^2\\ \text{TSS} &= \sum_{i=1}^n w_i \left( y - \bar{y} \right)^2\\ \end{align}