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, 3, raw=True)",
  "degree": 3,
  "n": 60,
  "k": 3,
  "df_residual": 58,
  "df_model": 3,
  "variable_names": [
    "Intercept",
    "x^1",
    "x^2",
    "x^3"
  ],
  "coefficients": [
    16.96333333333333,
    1.2333333333333338,
    1.2333333333333354,
    1.2333333333333363
  ],
  "std_errors": [
    1.3660201722928953,
    0.643948084710614,
    0.643948084710614,
    0.6439480847106147
  ],
  "t_stats": [
    12.418069423425862,
    1.9152682686952716,
    1.915268268695274,
    1.9152682686952733
  ],
  "p_values": [
    5.601357826557608e-18,
    0.06039337122412825,
    0.06039337122412796,
    0.06039337122412805
  ],
  "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.092444444444443,
  "residual_std_error": 7.482000623719122,
  "log_likelihood": -204.86927859932416,
  "aic": 413.7385571986483,
  "bic": 417.9272463230925,
  "conf_int_lower": [
    14.228946870759556,
    -0.05566880671373964,
    -0.055668806713738084,
    -0.05566880671373853
  ],
  "conf_int_upper": [
    19.697719795907105,
    2.5223354733804073,
    2.5223354733804086,
    2.5223354733804113
  ],
  "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.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334,
    20.663333333333334
  ],
  "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.463333333333335,
    0.836666666666666,
    -3.0633333333333326,
    -10.963333333333335,
    -6.163333333333334,
    -10.663333333333334,
    -12.463333333333335,
    -11.263333333333334,
    -4.163333333333334,
    -10.963333333333335,
    -0.9633333333333347,
    2.6366666666666667,
    2.9366666666666674,
    5.736666666666665,
    -0.663333333333334,
    4.536666666666665,
    5.136666666666667,
    0.5366666666666653,
    -6.163333333333334,
    6.636666666666667,
    4.836666666666666,
    5.736666666666665,
    1.7366666666666646,
    3.836666666666666,
    4.136666666666667,
    10.236666666666665,
    5.736666666666665,
    6.636666666666667,
    8.736666666666665,
    2.336666666666666
  ]
}