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": "ols",
  "method": "statsmodels",
  "dataset": "iris",
  "formula": "Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width + Species",
  "n": 229,
  "k": 4,
  "df_residual": 224,
  "variable_names": [
    "Intercept",
    "Sepal.Width",
    "Petal.Length",
    "Petal.Width",
    "Species"
  ],
  "coefficients": [
    4.55679249857877,
    0.20362067322277042,
    -0.292637056833855,
    0.677527192062011,
    1.1501401241589695
  ],
  "std_errors": [
    0.2551277973251274,
    0.07725146730332651,
    0.10514679931225912,
    0.23747972306722637,
    0.3606126755115713
  ],
  "t_stats": [
    17.86082326721822,
    2.6358162547677892,
    -2.7831285283805713,
    2.8529896502793832,
    3.189405703854866
  ],
  "p_values": [
    5.886870988743519e-45,
    0.008980267883838667,
    0.005843436403816725,
    0.004736544978631946,
    0.0016296028063621393
  ],
  "r_squared": 0.5505195254852837,
  "adj_r_squared": 0.542493088440378,
  "f_statistic": 68.58828175008196,
  "f_p_value": 7.954096564500746e-38,
  "mse": 0.09998469536940792,
  "std_error": 0.31620356634517566,
  "log_likelihood": -58.74570934335205,
  "aic": 127.4914186867041,
  "bic": 144.66002870447528,
  "conf_int_lower": [
    4.054034864687972,
    0.051388084993594346,
    -0.4998404920834233,
    0.20954704674618085,
    0.43951283308341726
  ],
  "conf_int_upper": [
    5.059550132469568,
    0.3558532614519465,
    -0.08543362158428669,
    1.145507337377841,
    1.8607674152345217
  ],
  "residuals": [
    0.10472158629652828,
    0.006531922907914378,
    -0.2634559174200257,
    -0.28456643873097853,
    -0.06335480238799462,
    0.2755589956451754,
    -0.4041800520645804,
    0.05434735930219059,
    -0.47310600976980854,
    0.08318628047522303,
    0.3932611573353597,
    -0.11638893501442382,
    -0.025715357885885304,
    -0.6135064749360417,
    0.6443838383183715,
    0.4152212476670183,
    0.15850417291163232,
    0.03696886709032654,
    0.6636737821736531,
    0.005146370806881073,
    0.5128747706689625,
    -0.0422442810770427,
    -0.532695303759291,
    0.16505933427468467,
    0.2339852919799137,
    0.38254918236286617,
    0.08318628047522303,
    -0.5227317827754714,
    0.15434735930219023,
    -0.09229483859305887,
    -0.34795003072573394,
    -0.5634559174200255,
    -0.09229483859305887,
    -0.0422442810770427,
    0.10216279569646769,
    -0.3341922117366405,
    0.2932611573353592,
    0.04544572094108279,
    1.0683373211816978,
    0.4005846019754973,
    0.979474080664545,
    -0.23917876507837832,
    0.5527691655812195,
    -0.14098910168976353,
    0.21246981544701882,
    -1.0074471429826781,
    0.7679125366713446,
    -0.4172186747467208,
    0.06557630051757446,
    0.21694005769049607,
    0.22942352314852954,
    -0.4172186747467208,
    -0.12845654926159877,
    0.21694005769049607,
    0.22942352314852954,
    -0.4172186747467208,
    -0.13768185710102898,
    0.4294235231485297,
    0.4190352176543577,
    0.6416324060983722,
    0.9790492961541917,
    0.25788674678133994,
    0.21641415814811094,
    0.2542660735585702,
    0.68022253465322,
    -0.4172186747467208,
    -0.4262214281398595,
    -0.30916660540631824,
    0.7209466692977742,
    -0.6172186747467201,
    0.7982483658217268,
    0.7304956466155259,
    0.38859827347194376,
    -0.34946595554051907,
    -0.13768185710102898,
    -0.24914228606219702,
    0.3501092599491278,
    -0.34024064770108886,
    -0.040665432211442365,
    -0.24914228606219702,
    -0.34024064770108886,
    -0.040665432211442365,
    -0.40841815141764304,
    0.24354385774178944,
    -0.010875826985671466,
    -0.08870342305200918,
    -0.08870342305200918,
    -0.4108758269856718,
    0.002819723097235105,
    -0.08870342305200918,
    -0.15645614225821092,
    -0.08870342305200918,
    -0.020950703845808327,
    -0.08870342305200918,
    -0.15645614225821092,
    -0.010875826985671466,
    -0.08870342305200918,
    -0.08870342305200918,
    -0.15645614225821092,
    -0.08870342305200918,
    -0.08870342305200918,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.010875826985671466,
    -0.15645614225821092,
    -0.33907765004634705,
    -0.05943971736862341,
    -0.3179671287353951,
    -0.05943971736862341,
    -0.05943971736862341,
    -0.05943971736862341,
    -0.2594397173686236,
    0.34056028263137694,
    -0.30916660540631824,
    -0.010875826985671466,
    -0.2786285461918725,
    -0.15645614225821092,
    -0.44467204381871994,
    -0.26167483849036266,
    -0.2786285461918725,
    -0.44467204381871994,
    -0.26167483849036266,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    0.1705724423034365,
    -0.08870342305200918,
    -0.26167483849036266,
    -0.2209507038458085,
    -0.12095070384580797,
    -0.12095070384580797,
    -0.2209507038458085,
    -0.2209507038458085,
    -0.26167483849036266,
    -0.16167483849036213,
    -0.1005886365235309,
    0.3994113634764691,
    -0.16167483849036213,
    -0.1005886365235309,
    0.35868722883191495,
    -0.26167483849036266,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.1005886365235309,
    0.3994113634764691,
    -0.16167483849036213,
    -0.1005886365235309,
    0.35868722883191495,
    -0.4172186747467208,
    -0.3769193246125191,
    0.1705724423034365,
    -0.21087582698567164,
    -0.26167483849036266,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.020950703845808327,
    -0.010875826985671466,
    -0.15645614225821092,
    -0.15645614225821092,
    -0.41764345925707325,
    -0.010875826985671466,
    -0.15645614225821092,
    -0.15645614225821092,
    -0.010875826985671466,
    -0.15645614225821092,
    0.002819723097235105,
    -0.15645614225821092,
    -0.07862854619187232,
    -0.15645614225821092,
    -0.07862854619187232,
    0.002819723097235105,
    -0.07862854619187232,
    -0.07862854619187232,
    0.002819723097235105,
    -0.07862854619187232,
    0.002819723097235105,
    -0.07862854619187232,
    -0.07862854619187232,
    0.8248910119988659,
    0.7663636006320953,
    0.7663636006320953,
    0.678572483581938,
    0.678572483581938,
    0.678572483581938,
    0.8248910119988659
  ],
  "vif": [
    {
      "variable": "Sepal.Width",
      "vif": 1.8950240072658073,
      "rsquared": 0.4723021997790796
    },
    {
      "variable": "Petal.Length",
      "vif": 38.264830758035224,
      "rsquared": 0.973866342011979
    },
    {
      "variable": "Petal.Width",
      "vif": 27.29358984162177,
      "rsquared": 0.9633613604585266
    },
    {
      "variable": "Species",
      "vif": 41.222082670275014,
      "rsquared": 0.9757411577673368
    }
  ]
}