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, 2, raw=True)",
  "degree": 2,
  "n": 48,
  "k": 2,
  "df_residual": 45,
  "df_model": 2,
  "variable_names": [
    "Intercept",
    "x^1",
    "x^2"
  ],
  "coefficients": [
    86.54241814573341,
    -61.48983014006447,
    14.119239153794016
  ],
  "std_errors": [
    33.98875278182745,
    28.208649759072824,
    5.6530569672390945
  ],
  "t_stats": [
    2.5462075263910386,
    -2.1798218158346034,
    2.497629023662525
  ],
  "p_values": [
    0.014383128316525837,
    0.03454270730001297,
    0.0162266964927267
  ],
  "r_squared": 0.21952081321705819,
  "adj_r_squared": 0.18483284936003852,
  "f_statistic": 6.32844332177874,
  "f_p_value": 0.0037855574176622274,
  "mse": 159.77276152543243,
  "rmse": 12.640125059722804,
  "mae": 10.203314142581384,
  "residual_std_error": 12.640125059722804,
  "log_likelihood": -188.33018665301114,
  "aic": 382.6603733060223,
  "bic": 388.27397633874597,
  "conf_int_lower": [
    18.085555984021454,
    -118.30496721556591,
    2.7333979585412767
  ],
  "conf_int_upper": [
    154.99928030744536,
    -4.67469306456303,
    25.505080349046757
  ],
  "fitted_values": [
    20.293643335432208,
    20.293643335432208,
    20.293643335432208,
    19.60190934195462,
    19.679619519829618,
    26.075961031673238,
    19.806583947155474,
    19.806583947155474,
    21.063087506784846,
    20.039714480780532,
    20.68219422480731,
    22.81430806208851,
    19.60190934195462,
    21.607058751909978,
    34.355970632377854,
    34.355970632377854,
    23.449130198717715,
    19.60190934195462,
    19.60190934195462,
    20.68219422480731,
    20.68219422480731,
    21.607058751909978,
    23.449130198717715,
    29.146080109686142,
    19.806583947155474,
    20.039714480780532,
    20.039714480780532,
    26.964712022954135,
    26.964712022954135,
    23.449130198717715,
    23.449130198717715,
    19.806583947155474,
    22.114916461213344,
    20.293643335432208,
    21.607058751909978,
    22.81430806208851,
    26.075961031673238,
    28.130364691079418,
    19.679619519829618,
    37.38449306833749,
    44.28869228948443,
    44.28869228948443,
    31.609832979494048,
    22.114916461213344,
    19.679619519829618,
    40.69540028737302,
    29.146080109686142,
    26.964712022954135
  ],
  "residuals": [
    -19.293643335432208,
    -18.293643335432208,
    -17.293643335432208,
    -15.60190934195462,
    -14.679619519829618,
    -20.075961031673238,
    -12.806583947155474,
    -11.806583947155474,
    -12.063087506784846,
    -10.039714480780532,
    -9.682194224807311,
    -10.81430806208851,
    -6.60190934195462,
    -7.607058751909978,
    -19.355970632377854,
    -18.355970632377854,
    -6.4491301987177145,
    -1.6019093419546202,
    -0.6019093419546202,
    -0.6821942248073114,
    0.3178057751926886,
    0.39294124809002184,
    -0.44913019871771453,
    -5.146080109686142,
    5.193416052844526,
    5.960285519219468,
    6.960285519219468,
    1.035287977045865,
    2.035287977045865,
    6.5508698012822855,
    7.5508698012822855,
    12.193416052844526,
    10.885083538786656,
    13.706356664567792,
    13.392941248090022,
    13.18569193791149,
    10.924038968326762,
    9.869635308920582,
    19.320380480170382,
    2.615506931662509,
    -3.2886922894844304,
    -2.2886922894844304,
    11.390167020505952,
    21.885083538786656,
    25.320380480170382,
    5.304599712626981,
    17.853919890313858,
    21.035287977045865
  ]
}