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, 3, raw=True)",
  "degree": 3,
  "n": 16,
  "k": 3,
  "df_residual": 12,
  "df_model": 3,
  "variable_names": [
    "Intercept",
    "x^1",
    "x^2",
    "x^3"
  ],
  "coefficients": [
    72.78969817244456,
    -0.031191292079496336,
    0.0004528977467661219,
    -4.529524568034108e-07
  ],
  "std_errors": [
    24.87634098143339,
    0.20336411520188075,
    0.0005337037189598048,
    4.5168884048372804e-07
  ],
  "t_stats": [
    2.926061281551479,
    -0.15337657800901874,
    0.8485939495584277,
    -1.00279753716813
  ],
  "p_values": [
    0.012696546914645994,
    0.8806503215165716,
    0.4127152863291471,
    0.33575152915375744
  ],
  "r_squared": 0.9887385999364227,
  "adj_r_squared": 0.9859232499205284,
  "f_statistic": 351.19562198462,
  "f_p_value": 5.952554326234237e-12,
  "mse": 1.6393448819738357,
  "rmse": 1.280369041321226,
  "mae": 0.9072377328337575,
  "residual_std_error": 1.280369041321226,
  "log_likelihood": -24.3559335502105,
  "aic": 56.711867100421,
  "bic": 59.80222198938013,
  "conf_int_lower": [
    18.588807286920833,
    -0.47428363537527835,
    -0.0007099427633446137,
    -1.4370978974668717e-06
  ],
  "conf_int_upper": [
    126.9905890579683,
    0.4119010512162857,
    0.0016157382568768575,
    5.311929838600501e-07
  ],
  "fitted_values": [
    84.51691758624818,
    87.27024024158546,
    87.11629713761923,
    90.15460547008183,
    95.41665396355236,
    97.57394043729468,
    99.76197698976361,
    99.4927317422405,
    103.49949094544363,
    105.9322743273928,
    108.44987219573888,
    108.63326700347574,
    112.31587269012866,
    114.01115270971812,
    115.21194221832796,
    117.5427643546139
  ],
  "residuals": [
    -1.5169175862481836,
    1.229759758414545,
    1.0837028623807754,
    -0.6546054700818331,
    0.7833460364476394,
    0.5260595627053135,
    -0.7619769897636104,
    0.507268257759506,
    -2.2994909454436225,
    -1.3322743273928097,
    -0.04987219573887103,
    2.16673299652426,
    0.2841273098713373,
    0.18884729028188474,
    0.4880577816720404,
    -0.6427643546138881
  ]
}