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": "lh",
  "formula": "time ~ poly(value, 3, raw=True)",
  "degree": 3,
  "n": 48,
  "k": 3,
  "df_residual": 44,
  "df_model": 3,
  "variable_names": [
    "Intercept",
    "x^1",
    "x^2",
    "x^3"
  ],
  "coefficients": [
    200.80357807929204,
    -211.90426606964942,
    77.61580674580348,
    -8.612073199198589
  ],
  "std_errors": [
    134.89578958153237,
    174.13055926106105,
    72.75324368450244,
    9.83757203314165
  ],
  "t_stats": [
    1.4885829921172176,
    -1.2169274995089003,
    1.0668363747792162,
    -0.8754266977853381
  ],
  "p_values": [
    0.1437300964779483,
    0.23011902240113133,
    0.2918645859342913,
    0.3860957878037781
  ],
  "r_squared": 0.23288212203772218,
  "adj_r_squared": 0.180578630358476,
  "f_statistic": 4.45251577974724,
  "f_p_value": 0.008125296605883656,
  "mse": 160.6065884497387,
  "rmse": 12.673065471689897,
  "mae": 9.959793823050026,
  "residual_std_error": 12.673065471689897,
  "log_likelihood": -187.91576433748543,
  "aic": 383.83152867497085,
  "bic": 391.31633271860244,
  "conf_int_lower": [
    -71.06102217231711,
    -562.84134892415,
    -69.00872151154822,
    -28.438396886047073
  ],
  "conf_int_upper": [
    472.6681783309012,
    139.03281678485112,
    224.24033500315517,
    11.214250487649897
  ],
  "fitted_values": [
    20.24708646224019,
    20.24708646224019,
    20.24708646224019,
    18.573341950685517,
    18.333917184243546,
    28.516997105580515,
    19.22828918974949,
    19.22828918974949,
    21.57806132896235,
    18.561687329618394,
    19.30832482600556,
    22.564891628597422,
    18.573341950685517,
    20.625502112600145,
    35.29537314210222,
    35.29537314210222,
    24.969854088320176,
    18.573341950685517,
    18.573341950685517,
    19.30832482600556,
    19.30832482600556,
    20.625502112600145,
    24.969854088320176,
    31.107064204213316,
    19.22828918974949,
    18.561687329618394,
    18.561687329618394,
    28.990287954261703,
    28.990287954261703,
    24.969854088320176,
    24.969854088320176,
    19.22828918974949,
    23.169541350720692,
    20.24708646224019,
    20.625502112600145,
    22.564891628597422,
    28.516997105580515,
    32.63305794495676,
    18.333917184243546,
    37.26356095164897,
    40.68964105597229,
    40.68964105597229,
    33.225983413225094,
    23.169541350720692,
    18.333917184243546,
    39.07887440267086,
    31.107064204213316,
    28.990287954261703
  ],
  "residuals": [
    -19.24708646224019,
    -18.24708646224019,
    -17.24708646224019,
    -14.573341950685517,
    -13.333917184243546,
    -22.516997105580515,
    -12.22828918974949,
    -11.22828918974949,
    -12.578061328962349,
    -8.561687329618394,
    -8.30832482600556,
    -10.564891628597422,
    -5.573341950685517,
    -6.625502112600145,
    -20.29537314210222,
    -19.29537314210222,
    -7.969854088320176,
    -0.5733419506855171,
    0.4266580493144829,
    0.6916751739944402,
    1.6916751739944402,
    1.3744978873998548,
    -1.9698540883201758,
    -7.107064204213316,
    5.771710810250511,
    7.438312670381606,
    8.438312670381606,
    -0.9902879542617029,
    0.009712045738297093,
    5.030145911679824,
    6.030145911679824,
    12.77171081025051,
    9.830458649279308,
    13.75291353775981,
    14.374497887399855,
    13.435108371402578,
    8.483002894419485,
    5.366942055043239,
    20.666082815756454,
    2.7364390483510306,
    0.3103589440277119,
    1.310358944027712,
    9.774016586774906,
    20.830458649279308,
    26.666082815756454,
    6.921125597329137,
    15.892935795786684,
    19.009712045738297
  ]
}