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_simple_linear",
  "formula": "x ~ y",
  "n": 100,
  "k": 1,
  "df_residual": 98,
  "df_model": 1,
  "variable_names": [
    "Intercept",
    "y"
  ],
  "coefficients": [
    -0.5477298145816423,
    0.32834276868358614
  ],
  "std_errors": [
    0.06496257613112023,
    0.0034072335865154503
  ],
  "t_stats": [
    -8.43146696455058,
    96.36638062709976
  ],
  "p_values": [
    3.019411865760516e-13,
    6.75198848315718e-99
  ],
  "r_squared": 0.9895572256372697,
  "adj_r_squared": 0.989450666715201,
  "f_statistic": 9286.479315167073,
  "f_p_value": 6.751988483157012e-99,
  "mse": 0.09059302297084497,
  "rmse": 0.30098674882932136,
  "mae": 0.23524546272942687,
  "residual_std_error": 0.30098674882932136,
  "log_likelihood": -20.814814052072208,
  "aic": 45.629628104144416,
  "bic": 50.8399684761206,
  "conf_int_lower": [
    -0.6766459326748799,
    0.321581224521238
  ],
  "conf_int_upper": [
    -0.41881369648840466,
    0.3351043128459343
  ],
  "fitted_values": [
    0.27204822302956067,
    0.1630554480208778,
    0.5206151880141274,
    0.9075249887022931,
    0.4300643902002478,
    0.5295675895496654,
    1.224465683121803,
    1.0574220273835047,
    0.7507896726175878,
    1.1825816679015948,
    0.9517739613904845,
    1.0505126216519014,
    1.3823759892524412,
    0.7742155029829247,
    0.9355607475944518,
    1.416799809018233,
    1.3683648875979597,
    1.9035993097852224,
    1.601773140253466,
    1.535694380414944,
    2.5801470713308383,
    2.1242776897125557,
    2.320079911700903,
    1.9295995585631889,
    2.3181590003993175,
    2.6328215703003153,
    2.317978330829556,
    2.9187542850019703,
    2.6976789957349903,
    2.8986166414385863,
    2.8963239685507824,
    3.8015699397112703,
    3.2884538847893987,
    3.0450916747411227,
    3.7619578921199457,
    3.1905238428441223,
    3.7594556867584474,
    3.1469311302081833,
    3.453772168459147,
    4.054008225005107,
    4.331338231921354,
    4.244633415067819,
    4.249891410616497,
    4.288496275470703,
    4.001397301356538,
    4.350001473520178,
    4.534607513197395,
    5.132451169903007,
    4.997675120568555,
    4.405466862781185,
    5.190256785182372,
    5.056904983954433,
    5.060579331006022,
    5.58317906967742,
    5.820358629881079,
    5.88711429357589,
    5.405282004434591,
    5.678803170631073,
    5.988596579151957,
    6.29963962362842,
    5.921490848369308,
    6.117362270568514,
    5.914562773232647,
    5.984551875512972,
    6.743602457225079,
    7.021624893745707,
    6.652167093764323,
    7.104811675308178,
    6.99354728756111,
    6.762484116173718,
    7.192463964927949,
    7.678303324487264,
    7.261034727736899,
    7.886035187254401,
    6.611619205271123,
    7.841157118559749,
    7.69937045876832,
    7.6721100907605,
    7.899913788185423,
    7.31667872908371,
    7.9966527422906735,
    8.285533557299072,
    8.753031858000597,
    8.197103565826968,
    8.20130862487626,
    8.401521164708136,
    8.966332936082285,
    8.873208128542625,
    8.690819955637911,
    9.132788346436714,
    9.095633216395104,
    9.481303891820204,
    9.032240065842574,
    9.254666434734423,
    9.333003863210315,
    9.080712998445616,
    9.757974308851862,
    9.845958776756113,
    9.861419941112649,
    9.882213794423173
  ],
  "residuals": [
    -0.27204822302956067,
    -0.0620453470107768,
    -0.31859498599392544,
    -0.6044946856719902,
    -0.026023986159843804,
    -0.024517084499160346,
    -0.618405077061197,
    -0.3503513203127976,
    0.05729113546322029,
    -0.27349075881068563,
    0.05832704871052563,
    0.06059848945920976,
    -0.17025477713122905,
    0.5389158101483884,
    0.4785806665469621,
    0.09835170613328215,
    0.2477967285636562,
    -0.18642759261350528,
    0.21640867792835183,
    0.383497538776975,
    -0.559945051128818,
    -0.003065568500434601,
    -0.09785768947868068,
    0.3936327646691342,
    0.10608342384310676,
    -0.10756904504779019,
    0.30828429543307045,
    -0.19148155772924325,
    0.13060383254783803,
    0.030676287854342732,
    0.13397906175224783,
    -0.6702568083981393,
    -0.05613065246616644,
    0.2882416585922103,
    -0.32761445777651144,
    0.3448296925094132,
    -0.12309205039481164,
    0.5904426071655542,
    0.3846116699246913,
    -0.1146142856111676,
    -0.29093419151731315,
    -0.10321927365367767,
    -0.007467168192254903,
    0.05493806796364087,
    0.4430471430879068,
    0.19545307193436656,
    0.11185713326725111,
    -0.38497642242825947,
    -0.1491902720837066,
    0.544028086713765,
    -0.13975173467732205,
    0.0946101675607185,
    0.1919459215192303,
    -0.2296437161420659,
    -0.3658131753356253,
    -0.33155873802033486,
    0.2512836521310655,
    0.0787725869446847,
    -0.13001072056609875,
    -0.34004366403246067,
    0.13911521223675294,
    0.04425389104764754,
    0.3480634893936152,
    0.37908448812339124,
    -0.2789559925786147,
    -0.4559683280891411,
    0.014499572902344049,
    -0.33713490763141074,
    -0.12486041887424193,
    0.20721285352325136,
    -0.12175689422087821,
    -0.506586152770093,
    0.011692544990372866,
    -0.5122978135170273,
    0.863128269476352,
    -0.26539954280217337,
    -0.022602782000643806,
    0.10566768701727725,
    -0.02112590939754444,
    0.6631192507142689,
    0.08415533851740786,
    -0.10371537548089016,
    -0.4702035751723148,
    0.18673481801141634,
    0.2835398599722243,
    0.1843374211504507,
    -0.27946424921359814,
    -0.08532934066383824,
    0.19806893325097796,
    -0.14288935653772405,
    -0.004724125486013975,
    -0.2893846999010119,
    0.2606892270867185,
    0.1392729592049715,
    0.1619456317391812,
    0.515246597513979,
    -0.06100461188216677,
    -0.04797897877631563,
    0.037569957877250815,
    0.11778620557682729
  ],
  "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
  ]
}