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": "polynomial",
  "method": "statsmodels",
  "dataset": "ToothGrowth",
  "formula": "len ~ poly(supp, 2, raw=True)",
  "degree": 2,
  "n": 60,
  "k": 2,
  "df_residual": 58,
  "df_model": 2,
  "variable_names": [
    "Intercept",
    "x^1",
    "x^2"
  ],
  "coefficients": [
    16.96333333333333,
    1.849999999999998,
    1.8499999999999972
  ],
  "std_errors": [
    1.366020172292895,
    0.9659221270659221,
    0.965922127065922
  ],
  "t_stats": [
    12.418069423425864,
    1.915268268695267,
    1.9152682686952662
  ],
  "p_values": [
    5.60135782655758e-18,
    0.06039337122412884,
    0.060393371224128946
  ],
  "r_squared": 0.05948364660775696,
  "adj_r_squared": 0.043267847411339044,
  "f_statistic": 3.6682525410709776,
  "f_p_value": 0.06039337122412847,
  "mse": 55.980333333333334,
  "rmse": 7.482000623719122,
  "mae": 6.092444444444445,
  "residual_std_error": 7.482000623719122,
  "log_likelihood": -204.86927859932416,
  "aic": 413.7385571986483,
  "bic": 417.9272463230925,
  "conf_int_lower": [
    14.228946870759556,
    -0.08350321007061412,
    -0.08350321007061479
  ],
  "conf_int_upper": [
    19.697719795907105,
    3.7835032100706103,
    3.7835032100706094
  ],
  "fitted_values": [
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    16.96333333333333,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327,
    20.663333333333327
  ],
  "residuals": [
    -12.763333333333332,
    -5.463333333333331,
    -9.66333333333333,
    -11.16333333333333,
    -10.56333333333333,
    -6.963333333333331,
    -5.763333333333332,
    -5.763333333333332,
    -11.763333333333332,
    -9.963333333333331,
    -0.46333333333333115,
    -0.46333333333333115,
    -1.7633333333333319,
    0.33666666666666956,
    5.536666666666669,
    0.33666666666666956,
    -3.3633333333333315,
    -2.463333333333331,
    1.8366666666666696,
    -1.4633333333333312,
    6.63666666666667,
    1.5366666666666688,
    16.936666666666667,
    8.536666666666669,
    9.436666666666667,
    15.536666666666669,
    9.736666666666668,
    4.536666666666669,
    6.33666666666667,
    12.536666666666669,
    -5.463333333333328,
    0.8366666666666731,
    -3.0633333333333255,
    -10.963333333333328,
    -6.163333333333327,
    -10.663333333333327,
    -12.463333333333328,
    -11.263333333333327,
    -4.163333333333327,
    -10.963333333333328,
    -0.9633333333333276,
    2.636666666666674,
    2.9366666666666745,
    5.736666666666672,
    -0.6633333333333269,
    4.536666666666672,
    5.136666666666674,
    0.5366666666666724,
    -6.163333333333327,
    6.636666666666674,
    4.836666666666673,
    5.736666666666672,
    1.7366666666666717,
    3.836666666666673,
    4.136666666666674,
    10.236666666666672,
    5.736666666666672,
    6.636666666666674,
    8.736666666666672,
    2.336666666666673
  ]
}