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": "longley",
  "formula": "GNP.deflator ~ poly(GNP, 2, raw=True)",
  "degree": 2,
  "n": 16,
  "k": 2,
  "df_residual": 13,
  "df_model": 2,
  "variable_names": [
    "Intercept",
    "x^1",
    "x^2"
  ],
  "coefficients": [
    48.437150773139045,
    0.17068240008130875,
    -8.102425752596053e-05
  ],
  "std_errors": [
    5.394680829751791,
    0.028833950012056044,
    3.6822165684571695e-05
  ],
  "t_stats": [
    8.97868702556174,
    5.919494207694162,
    -2.200420752544419
  ],
  "p_values": [
    6.185219478346924e-07,
    5.071224061051795e-05,
    0.046461606941527095
  ],
  "r_squared": 0.9877948918890233,
  "adj_r_squared": 0.985917182948873,
  "f_statistic": 526.0639020070757,
  "f_p_value": 3.651914485976e-13,
  "mse": 1.6400514270837596,
  "rmse": 1.280644926231998,
  "mae": 0.9547879863983484,
  "residual_std_error": 1.280644926231998,
  "log_likelihood": -24.999722407627672,
  "aic": 55.999444815255345,
  "bic": 58.31721098197469,
  "conf_int_lower": [
    36.78265139692259,
    0.10839043823324795,
    -0.000160573710133989
  ],
  "conf_int_upper": [
    60.0916501493555,
    0.23297436192936954,
    -1.4748049179320774e-06
  ],
  "fitted_values": [
    83.97862990059139,
    87.26352071271579,
    87.08687026958461,
    90.45050252209437,
    95.81857947941624,
    97.90777932526342,
    99.9846989405537,
    99.73090378072871,
    103.47777132530786,
    105.74687523951572,
    108.12567544668322,
    108.30122236420627,
    111.9473206610919,
    113.7549391157017,
    115.12488495347235,
    118.19982596317475
  ],
  "residuals": [
    -0.9786299005913861,
    1.2364792872842116,
    1.1131297304153946,
    -0.9505025220943679,
    0.3814205205837595,
    0.1922206747365749,
    -0.9846989405536988,
    0.26909621927129024,
    -2.277771325307853,
    -1.1468752395157225,
    0.27432455331678796,
    2.4987776357937292,
    0.6526793389081007,
    0.44506088429830015,
    0.5751150465276567,
    -1.2998259631747402
  ]
}