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": "wls",
  "method": "statsmodels",
  "dataset": "synthetic_nonlinear",
  "formula": "x ~ y",
  "n": 100,
  "k": 1,
  "df_residual": 98,
  "df_model": 1,
  "variable_names": [
    "Intercept",
    "y"
  ],
  "coefficients": [
    -2.1867547487264636,
    0.5969565979968713
  ],
  "std_errors": [
    0.2534941854914555,
    0.047857726506936135
  ],
  "t_stats": [
    -8.6264493384215,
    12.473567834659946
  ],
  "p_values": [
    1.1480274749960393e-13,
    5.973272584624479e-22
  ],
  "r_squared": 0.6135492694484908,
  "adj_r_squared": 0.6096058946469447,
  "f_statistic": 155.5898945258632,
  "f_p_value": 5.973272584624479e-22,
  "mse": 3.352532449125818,
  "rmse": 1.8309922034585013,
  "mae": 1.475761152176458,
  "residual_std_error": 1.8309922034585013,
  "log_likelihood": -201.3695187150849,
  "aic": 406.7390374301698,
  "bic": 411.949377802146,
  "conf_int_lower": [
    -2.6898057097413934,
    0.5019844972970886
  ],
  "conf_int_upper": [
    -1.683703787711534,
    0.691928698696654
  ],
  "fitted_values": [
    -0.08895423499959598,
    -0.20729515465566584,
    -0.051234959581487605,
    -0.5967816006524409,
    -0.5218701525574472,
    -0.7926914675792458,
    -0.8848977643933071,
    -0.9443345193794046,
    -0.8789400565122567,
    -1.1776725946025606,
    -0.7458404581737195,
    -1.4699027030511589,
    -1.33722993100492,
    -1.487619478716713,
    -0.9957398393078194,
    -1.4365715746468677,
    -1.2512088167007849,
    -2.0628981991380746,
    -1.5964261396832549,
    -1.4635890816153192,
    -1.7538998391086928,
    -1.5061178469196674,
    -2.0205663227760104,
    -1.4838791852574111,
    -1.2530850127866846,
    -2.0786185896099387,
    -2.130700463639862,
    -1.5876779144957638,
    -1.5701131825676775,
    -2.214088646633939,
    -2.1962335434777236,
    -2.1640596463106014,
    -2.486724052309822,
    -2.361459652751857,
    -2.3851489787038753,
    -2.3091239667813985,
    -2.081169583237544,
    -1.9881182601470815,
    -1.5787904400793076,
    -2.3194686568945153,
    -1.7039287536892944,
    -2.0341901795079393,
    -1.9540200582144647,
    -1.7031198377489265,
    -2.201275105342514,
    -1.7099996063239502,
    -1.7287774522904602,
    -1.5821385526088454,
    -1.589824283829701,
    -0.8866368566432927,
    -1.7495435653748297,
    -1.6537299779023518,
    -1.6136252612823294,
    -1.522167166085759,
    -1.471699026086546,
    -0.847986205527099,
    -0.6966667188317057,
    -1.2051319032786054,
    -1.193682242441613,
    -0.7113460364771365,
    -0.9200366644327933,
    -0.46579591339190096,
    -0.48999200046588065,
    -0.8951701731282724,
    0.13060440621724778,
    0.31985379651770396,
    -0.2803107817186721,
    -0.09070263363660835,
    0.23642147169759342,
    0.38065840094451797,
    0.6107793959623122,
    1.1512630308785647,
    0.639142533312461,
    0.5980343418309593,
    0.572617656620722,
    0.9178079900738441,
    1.281401757486301,
    1.9858951768856041,
    1.4583864799876074,
    1.8459561523553987,
    1.9441909756868743,
    2.4773894685385196,
    3.054155833274395,
    2.3223644715699336,
    2.519280629833763,
    3.165231910174243,
    3.2489616886475634,
    3.792147730482311,
    3.6144038164781236,
    3.535695752129026,
    4.025711476046775,
    4.390469431778017,
    4.518227708229932,
    4.642182445243906,
    5.03024643854131,
    5.285626050175624,
    5.577565119018118,
    5.5907049047437125,
    5.5829108505421186,
    5.915950175797705
  ],
  "residuals": [
    -4.911045765000404,
    -4.691694744334233,
    -4.74674483839831,
    -4.100188096317257,
    -4.074089443402149,
    -3.702258027370249,
    -3.5090416295460862,
    -3.3485947735498884,
    -3.3129791354069353,
    -2.9132364963065305,
    -3.24405853172527,
    -2.41898618583773,
    -2.450648856873868,
    -2.199249208151974,
    -2.5901187465507665,
    -2.048276910201617,
    -2.132629567137599,
    -1.2199300836902083,
    -1.5853920421349268,
    -1.6172189991927617,
    -1.2258981406892873,
    -1.3726700318682115,
    -0.7572114550017672,
    -1.1928884915102658,
    -1.3226725629708915,
    -0.3961288851375362,
    -0.2430369100975116,
    -0.6850493582315091,
    -0.6016039891494946,
    0.14338157592686818,
    0.2265365737807541,
    0.2953727776237325,
    0.7190472846330545,
    0.6947929860851907,
    0.8194924130473098,
    0.8444775021349342,
    0.7175332196011803,
    0.7254919975208192,
    0.4171742784631458,
    1.2588625962884548,
    0.7443327940933352,
    1.1756043209220803,
    1.1964443006387069,
    1.04655418118327,
    1.6457195497869588,
    1.2554541517784952,
    1.3752420987551064,
    1.3296133000835928,
    1.4383091323145496,
    0.8361318061382427,
    1.8000486158798799,
    1.8052451294175031,
    1.866150513807582,
    1.8757025196211128,
    1.926244480632,
    1.4035417610826544,
    1.3532323753973623,
    1.9627076608543632,
    2.052268101027471,
    1.6709419960730956,
    1.9806427250388539,
    1.6274120750080627,
    1.7526182630921427,
    2.2588065367646353,
    1.3340420584292165,
    1.2458027691388616,
    1.946977448385339,
    1.8583794013133756,
    1.632265396989275,
    1.5890385687524515,
    1.4599276747447587,
    1.020454140838607,
    1.6335847394148115,
    1.7757030319064144,
    1.902129818126753,
    1.6579495856837312,
    1.3953659192813754,
    0.7918826008921735,
    1.4204013988002715,
    1.1338418274425806,
    1.136617105121207,
    0.704428713279662,
    0.228672449553887,
    1.0614739122684504,
    0.9655678550147213,
    0.42062667568434353,
    0.43790699822112344,
    -0.00426894260352384,
    0.27448507241076525,
    0.4542032377699634,
    0.06519761486231523,
    -0.19855023985882525,
    -0.22529841530063965,
    -0.2482430513045113,
    -0.5352969435918151,
    -0.6896664542160291,
    -0.8805954220484207,
    -0.7927251067639149,
    -0.6839209515522189,
    -0.9159501757977049
  ],
  "weights": [
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0,
    1.0
  ]
}