Module regression

Module regression 

Source
Expand description

Regression metrics module

This module provides functions for evaluating regression models, including error metrics, correlation metrics, residual analysis, and robust metrics.

Structs§

ErrorHistogram
Structure representing a histogram of residuals
QQPlotData
Structure representing Q-Q plot data for residuals
ResidualAnalysis
Structure representing comprehensive residual analysis

Functions§

adjusted_r2_score
Calculates the adjusted R^2 score
compute_robust_weights
Computes robust weights for regression metrics based on residuals
concordance_correlation
Calculates the concordance correlation coefficient (CCC)
error_histogram
Calculates a histogram of error/residual values
explained_variance_score
Calculates the explained variance score
huber_loss
Calculates the Huber loss
m_estimator
Calculates the M-estimator for regression
max_error
Calculates the maximum error
mean_absolute_error
Calculates the mean absolute error (MAE)
mean_absolute_percentage_error
Calculates the mean absolute percentage error (MAPE)
mean_gamma_deviance
Calculates the mean gamma deviance
mean_poisson_deviance
Calculates the mean Poisson deviance
mean_squared_error
Calculates the mean squared error (MSE)
mean_squared_log_error
Calculates the mean squared logarithmic error (MSLE)
median_absolute_error
Calculates the median absolute error
normalized_root_mean_squared_error
Calculates the normalized root mean squared error (NRMSE)
pearson_correlation
Calculates the Pearson correlation coefficient between true and predicted values
qq_plot_data
Calculates Q-Q plot data for residuals
quantile_loss
Calculates the quantile loss (pinball loss)
r2_score
Calculates the R² score (coefficient of determination)
relative_absolute_error
Calculates the relative absolute error (RAE)
relative_squared_error
Calculates the relative squared error (RSE)
residual_analysis
Performs comprehensive residual analysis for a regression model
root_mean_squared_error
Calculates the root mean squared error (RMSE)
spearman_correlation
Calculates the Spearman rank correlation coefficient between true and predicted values
symmetric_mean_absolute_percentage_error
Calculates the symmetric mean absolute percentage error (SMAPE)
test_autocorrelation
Checks for autocorrelation in residuals using Durbin-Watson test
test_heteroscedasticity
Checks for heteroscedasticity in residuals using Breusch-Pagan test
test_normality
Checks for normality of residuals using Shapiro-Wilk test
tweedie_deviance_score
Calculates the Tweedie deviance score
weighted_mean_squared_error
Calculates the weighted mean squared error
weighted_median_absolute_error
Calculates the weighted median absolute error