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_nonnormal",
  "formula": "x ~ y",
  "n": 100,
  "k": 1,
  "df_residual": 98,
  "df_model": 1,
  "variable_names": [
    "Intercept",
    "y"
  ],
  "coefficients": [
    -1.3064151664463464,
    0.6608583960937688
  ],
  "std_errors": [
    0.08714247561096153,
    0.008299866541473832
  ],
  "t_stats": [
    -14.991715088273374,
    79.6227737869648
  ],
  "p_values": [
    4.1443760371924146e-27,
    7.087125134641938e-91
  ],
  "r_squared": 0.9847773755770145,
  "adj_r_squared": 0.9846220426747392,
  "f_statistic": 6339.786105530168,
  "f_p_value": 7.08712513464197e-91,
  "mse": 0.13205911725430594,
  "rmse": 0.3633993908281988,
  "mae": 0.26538165161885596,
  "residual_std_error": 0.3633993908281988,
  "log_likelihood": -39.658438021238524,
  "aic": 83.31687604247705,
  "bic": 88.52721641445324,
  "conf_int_lower": [
    -1.4793465732015987,
    0.6443875810654501
  ],
  "conf_int_upper": [
    -1.133483759691094,
    0.6773292111220875
  ],
  "fitted_values": [
    -0.18026389218988648,
    0.2346038848523515,
    -0.056956948238636285,
    0.5481710248595844,
    0.6750734084351366,
    0.41953113455936264,
    0.2877696324156125,
    0.4975760803233704,
    0.8029694691329086,
    1.8988921862541353,
    1.0163265650237947,
    0.885709307674309,
    1.2185599351493503,
    1.2431404911143549,
    1.5867731529888114,
    1.2242104060938757,
    1.7599325442888905,
    1.6445823022662456,
    2.576513433027105,
    1.7255806352773795,
    2.0183534314454334,
    2.6760157779697322,
    1.9234706562917734,
    2.90257573305655,
    2.4727409617564575,
    2.2113358027998604,
    2.4065649608828323,
    2.7953376729176065,
    2.5115535903642403,
    2.8770036920013387,
    2.829031222841486,
    3.109419351461868,
    2.9045054526951195,
    3.6672424097975402,
    4.288816684310614,
    4.335959544164053,
    3.7471668625184713,
    3.435733657389488,
    3.9589930202836814,
    3.5981705461532063,
    3.6974671730112516,
    3.919398002777432,
    4.1119497388553174,
    4.476674695761561,
    4.470517843981721,
    4.385815479133663,
    4.396490482814697,
    6.324501204424649,
    4.674649493644047,
    4.7896225185891765,
    4.750415457645024,
    5.314844770663731,
    5.282576985030932,
    5.074190685988489,
    5.120303676707399,
    5.569044062496765,
    5.643334319228323,
    5.497754172509309,
    6.488050102611604,
    5.646658469297275,
    5.879772796481376,
    6.742977859739884,
    6.072774599766683,
    6.329299401358494,
    6.260665816597562,
    6.299229458256425,
    7.659374869482853,
    6.567558933410821,
    7.235613493910996,
    6.680189638738659,
    6.773167317182693,
    6.804557850030664,
    7.242706012629197,
    7.146264798544479,
    7.7546078534315335,
    7.406416552436765,
    8.434104071576675,
    7.46269514428046,
    8.165684462417776,
    8.090386951651091,
    8.182228109061558,
    8.410974617451961,
    8.368511096717599,
    8.320839065482941,
    8.142286869827801,
    8.206853802562057,
    9.13415268927414,
    8.713005704830149,
    9.022451047055815,
    8.813492950173105,
    8.737808508123951,
    8.840900728751476,
    9.279137530980801,
    9.18288588732664,
    9.1710480161274,
    9.420755555652805,
    9.319286478711847,
    9.685690390607695,
    9.601152613793076,
    10.125545335980544
  ],
  "residuals": [
    0.18026389218988648,
    -0.1335937838422505,
    0.2589771502588383,
    -0.24514072182928137,
    -0.27103300439473266,
    0.08551937049114244,
    0.3182909736449936,
    0.20949462674733665,
    0.005111338947899502,
    -0.9898012771632261,
    -0.0062255549227845375,
    0.22540180343680216,
    -0.0064387230281381935,
    0.06999082201695828,
    -0.17263173884739746,
    0.2909411090576395,
    -0.14377092812727454,
    0.07258941490547155,
    -0.7583316148452872,
    0.19361128391453963,
    0.0018485887565868886,
    -0.5548036567576111,
    0.29875156593044894,
    -0.5793434098242267,
    -0.04849853751403321,
    0.31391672245266466,
    0.21969766537979396,
    -0.06806494564487942,
    0.316729237918588,
    0.05228923729159041,
    0.2012718074615445,
    0.021893779851263062,
    0.32781777962811276,
    -0.3339090764642072,
    -0.8544732499671799,
    -0.8006060088105178,
    -0.11080322615483551,
    0.30164007998424935,
    -0.12060918189984315,
    0.3412233932407327,
    0.34293686739278906,
    0.22201613863670877,
    0.13047450356892476,
    -0.13324035232721787,
    -0.026073399537276387,
    0.15963906632088154,
    0.2499741636499495,
    -1.577026456949902,
    0.1738353548408016,
    0.1598724309057733,
    0.3000895928600258,
    -0.16332961914857957,
    -0.030051732505679496,
    0.27934466754686493,
    0.33424177783805487,
    -0.013488506941209621,
    0.013231337337333393,
    0.25982158506644915,
    -0.6294642440257459,
    0.3129374902986841,
    0.1808332641246846,
    -0.5813616981237226,
    0.18985166285957877,
    0.03433696227786953,
    0.20398064804890215,
    0.26642710740014053,
    -0.9927082028161864,
    0.20011783426594665,
    -0.3669266252241279,
    0.28950733095831094,
    0.29753975352437756,
    0.36715932168650767,
    0.030021260098074265,
    0.22747257519289477,
    -0.27986037868405855,
    0.16934102332081036,
    -0.7573363948089984,
    0.315082633497318,
    -0.2868965836298969,
    -0.11058897185311167,
    -0.10142002825347696,
    -0.2291564356337794,
    -0.08568281388931709,
    0.06299931835544292,
    0.34256161502068316,
    0.37900478329653,
    -0.4472840024054534,
    0.07487308304863838,
    -0.13356215816692618,
    0.17640603972588487,
    0.3531005827851388,
    0.35101846316771557,
    0.013791761948491299,
    0.21105350661275502,
    0.32390147882209597,
    0.17520404030678982,
    0.37768321825784845,
    0.1122894073721028,
    0.29783728519682384,
    -0.12554533598054363
  ],
  "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
  ]
}