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": "prostate",
  "formula": "lcavol ~ poly(lweight, 3, raw=True)",
  "degree": 3,
  "n": 97,
  "k": 3,
  "df_residual": 93,
  "df_model": 3,
  "variable_names": [
    "Intercept",
    "x^1",
    "x^2",
    "x^3"
  ],
  "coefficients": [
    11.109117553611856,
    -12.171372843621379,
    4.2164769702239155,
    -0.43966895301683806
  ],
  "std_errors": [
    26.058034167177688,
    22.017664564608456,
    6.134327477619547,
    0.5633615624655556
  ],
  "t_stats": [
    0.42632216545347595,
    -0.5528003575449977,
    0.687357658293805,
    -0.7804383229353171
  ],
  "p_values": [
    0.6708582720260864,
    0.5817264422587757,
    0.49356798250067957,
    0.4371148337045415
  ],
  "r_squared": 0.10286960102499187,
  "adj_r_squared": 0.0739299107354755,
  "f_statistic": 3.5546199698708305,
  "f_p_value": 0.017340563399178128,
  "mse": 1.2864563793544115,
  "rmse": 1.1342206043598448,
  "mae": 0.9139006751232644,
  "residual_std_error": 1.1342206043598448,
  "log_likelihood": -147.8113657986292,
  "aic": 303.6227315972584,
  "bic": 313.92157551127195,
  "conf_int_lower": [
    -40.636973973855035,
    -55.89409108367858,
    -7.965081664624417,
    -1.558393365893636
  ],
  "conf_int_upper": [
    62.855209081078755,
    31.551345396435828,
    16.39803560507225,
    0.6790554598599599
  ],
  "fitted_values": [
    0.4017492065135002,
    1.0859664893123835,
    0.32197477390602103,
    1.0383395505824637,
    1.2284409858355616,
    0.9680507751519514,
    1.278665593853077,
    1.3565604386680405,
    1.3565604386680405,
    0.98856792815603,
    1.429035593478872,
    1.423079676370449,
    0.7010835520167475,
    0.6700057068670588,
    1.2403168342035116,
    0.7498044515454794,
    1.3292382722855578,
    1.4771193695417395,
    1.0186901433166327,
    1.6387889484742715,
    1.2123347843325263,
    1.3115858254907664,
    1.1578041161713415,
    1.2520212897119762,
    1.4956346962002272,
    0.8319129281327307,
    1.5469239446796763,
    1.6693136162901538,
    0.8376191501706245,
    1.1578041161713415,
    1.7806548673309237,
    1.6219694987065196,
    0.7195017157893986,
    1.0186901433166327,
    0.9524349304428981,
    1.7871599312697413,
    1.4851442647657223,
    0.0956150247429548,
    1.7793440123310518,
    0.6887087602433297,
    0.8546089545708426,
    1.5109312280088147,
    1.6693136162901538,
    1.6906219371112599,
    1.2000486005914013,
    1.1791765913810508,
    1.746344169999034,
    1.7631471219013264,
    1.3080013948611793,
    1.389156477611536,
    1.7454823029060407,
    1.791482673172652,
    1.4606602093481058,
    1.7874544007701445,
    1.3292382722855578,
    1.7834658677558934,
    0.5084854556984695,
    1.588118321777685,
    1.7936299667995854,
    1.6585390808957072,
    1.6328669560866444,
    1.5469239446796763,
    1.3396161702611806,
    1.703528064409923,
    1.4493803495741133,
    1.6472175279358936,
    1.678123867974108,
    1.7688741696389343,
    1.7280466025567591,
    1.250342358101804,
    1.417059178400919,
    1.1135269269571353,
    1.6387889484742715,
    0.9783530746069289,
    1.6569552811603216,
    1.0137235657932422,
    1.7111293365117461,
    1.7573426030002963,
    1.4048230027979116,
    1.6370688151765904,
    0.7617841283173377,
    1.278665593853077,
    1.6851721314679367,
    1.6488686826999555,
    1.5376337006185565,
    1.3327147902309662,
    1.5582295320785704,
    1.149111881571386,
    1.3670356735983091,
    1.5232807594510547,
    1.7834590675363984,
    1.5058909395450115,
    1.6766826239872756,
    1.6906219371112599,
    1.1833912443944499,
    1.5961928735551822,
    1.7363800141067287
  ],
  "residuals": [
    -0.9815677015135003,
    -2.0802187623123833,
    -0.832800397906021,
    -2.242312354582464,
    -0.4770248968355616,
    -2.0178728991519517,
    -0.5415015278530771,
    -0.6634132576680406,
    -2.1330892276680404,
    -0.7654243771560301,
    -1.1743933754788722,
    -2.7701533243704493,
    0.9123463819832525,
    0.8070430171329412,
    -0.03434602720351165,
    0.7913546204545205,
    -1.7447537162855578,
    0.8113667994582605,
    -1.5808090613166326,
    -1.4564673914742714,
    -0.0649323313325263,
    0.7476530085092334,
    -1.7025312911713415,
    0.5296878432880237,
    -1.1103722952002273,
    0.6150060548672693,
    -1.0341003186796764,
    -2.0697911832901537,
    0.20265756182937555,
    1.2518400488286585,
    -1.4954759253309238,
    -1.4396479417065196,
    0.5558610842106013,
    -1.0087398123166327,
    -0.9624852664428981,
    -0.4788271112697413,
    -0.062035930765722336,
    0.3618098222570452,
    0.881614581668948,
    0.10879843575667025,
    -0.23403246657084265,
    -0.06872923500881467,
    -1.087097996290154,
    0.08093482488874004,
    0.2860910954085987,
    0.4847495066189491,
    0.981508658000966,
    -0.5999963119013263,
    0.4377141361388208,
    -0.16832655661153595,
    -0.6535590019060407,
    -0.13135164617265205,
    -0.9478365833481058,
    0.3395861192298555,
    1.8243520857144424,
    -0.5165182647558935,
    0.46607418430153047,
    -1.124384305777685,
    -1.2513056757995855,
    -0.5972825788957072,
    -1.1754421090866445,
    0.4504937613203237,
    1.4360926797388194,
    0.331177583590077,
    0.6237915794258866,
    -0.1886025049358937,
    0.3447473220258921,
    0.4294609023610656,
    -2.174333705556759,
    -0.05641989010180404,
    0.4470209525990809,
    0.0464939900428647,
    -0.42387620447427143,
    0.8606079963930711,
    1.3422708818396782,
    2.1274069102067577,
    0.29976566248825387,
    0.7803146119997035,
    1.2434771942020886,
    1.1423713818234096,
    0.7060902196826624,
    1.234990469146923,
    0.9278345205320635,
    1.0287223113000445,
    0.024712604381443404,
    1.9701344687690336,
    0.4659635349214297,
    0.5825436634286139,
    1.440558157401691,
    0.03906554554894526,
    1.4630319244636016,
    1.0270119084549885,
    1.1535852100127242,
    2.1303816698887403,
    1.72405611460555,
    1.2863707014448176,
    1.7355864388932711
  ]
}