linreg-core 0.8.1

Lightweight regression library (OLS, Ridge, Lasso, Elastic Net, WLS, LOESS, Polynomial) with 14 diagnostic tests, cross validation, and prediction intervals. Pure Rust - no external math dependencies. WASM, Python, FFI, and Excel XLL bindings.
Documentation
{
  "test": "wls",
  "method": "statsmodels",
  "dataset": "ToothGrowth",
  "formula": "len ~ supp + dose",
  "n": 60,
  "k": 2,
  "df_residual": 57,
  "df_model": 2,
  "variable_names": [
    "Intercept",
    "supp",
    "dose"
  ],
  "coefficients": [
    5.5725,
    3.6999999999999984,
    9.763571428571424
  ],
  "std_errors": [
    1.2823649452308388,
    1.0936044998101517,
    0.8768342903408308
  ],
  "t_stats": [
    4.345486845007989,
    3.3833072199705776,
    11.13502464048967
  ],
  "p_values": [
    5.7866610880152105e-05,
    0.0013006624739974825,
    6.313519045319843e-16
  ],
  "r_squared": 0.7037969204703638,
  "adj_r_squared": 0.6934038299605519,
  "f_statistic": 67.71777074450864,
  "f_p_value": 8.71570914416457e-16,
  "mse": 17.93956203007519,
  "rmse": 4.235512015102211,
  "mae": 3.3963809523809525,
  "residual_std_error": 4.23551201510221,
  "log_likelihood": -170.20776645945463,
  "aic": 346.41553291890926,
  "bic": 352.6985666055756,
  "conf_int_lower": [
    3.004608490969641,
    1.5100947630049508,
    8.007741048641968
  ],
  "conf_int_upper": [
    8.140391509030358,
    5.889905236995046,
    11.51940180850088
  ],
  "fitted_values": [
    10.454285714285712,
    10.454285714285712,
    10.454285714285712,
    10.454285714285712,
    10.454285714285712,
    10.454285714285712,
    10.454285714285712,
    10.454285714285712,
    10.454285714285712,
    10.454285714285712,
    15.336071428571424,
    15.336071428571424,
    15.336071428571424,
    15.336071428571424,
    15.336071428571424,
    15.336071428571424,
    15.336071428571424,
    15.336071428571424,
    15.336071428571424,
    15.336071428571424,
    25.099642857142847,
    25.099642857142847,
    25.099642857142847,
    25.099642857142847,
    25.099642857142847,
    25.099642857142847,
    25.099642857142847,
    25.099642857142847,
    25.099642857142847,
    25.099642857142847,
    14.15428571428571,
    14.15428571428571,
    14.15428571428571,
    14.15428571428571,
    14.15428571428571,
    14.15428571428571,
    14.15428571428571,
    14.15428571428571,
    14.15428571428571,
    14.15428571428571,
    19.03607142857142,
    19.03607142857142,
    19.03607142857142,
    19.03607142857142,
    19.03607142857142,
    19.03607142857142,
    19.03607142857142,
    19.03607142857142,
    19.03607142857142,
    19.03607142857142,
    28.799642857142846,
    28.799642857142846,
    28.799642857142846,
    28.799642857142846,
    28.799642857142846,
    28.799642857142846,
    28.799642857142846,
    28.799642857142846,
    28.799642857142846,
    28.799642857142846
  ],
  "residuals": [
    -6.254285714285712,
    1.045714285714288,
    -3.154285714285712,
    -4.654285714285712,
    -4.054285714285712,
    -0.45428571428571196,
    0.7457142857142873,
    0.7457142857142873,
    -5.254285714285712,
    -3.454285714285712,
    1.1639285714285759,
    1.1639285714285759,
    -0.13607142857142485,
    1.9639285714285766,
    7.163928571428576,
    1.9639285714285766,
    -1.7360714285714245,
    -0.8360714285714241,
    3.4639285714285766,
    0.16392857142857586,
    -1.4996428571428453,
    -6.599642857142847,
    8.800357142857152,
    0.4003571428571533,
    1.3003571428571519,
    7.400357142857153,
    1.6003571428571526,
    -3.5996428571428467,
    -1.799642857142846,
    4.400357142857153,
    1.0457142857142898,
    7.3457142857142905,
    3.445714285714292,
    -4.45428571428571,
    0.3457142857142905,
    -4.1542857142857095,
    -5.95428571428571,
    -4.754285714285709,
    2.3457142857142905,
    -4.45428571428571,
    0.6639285714285776,
    4.263928571428579,
    4.56392857142858,
    7.363928571428577,
    0.9639285714285784,
    6.163928571428578,
    6.763928571428579,
    2.1639285714285776,
    -4.536071428571422,
    8.263928571428579,
    -3.299642857142846,
    -2.3996428571428474,
    -6.399642857142847,
    -4.299642857142846,
    -3.9996428571428453,
    2.1003571428571526,
    -2.3996428571428474,
    -1.4996428571428453,
    0.6003571428571526,
    -5.799642857142846
  ],
  "weights": [
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0
  ]
}