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
{
  "dataset": "lh",
  "alpha": 0.05,
  "n": 48,
  "p": 1,
  "df_residuals": 46,
  "mse": 177.96653998175736,
  "train": {
    "predicted": [
      24.5,
      24.5,
      24.5,
      22.806293706293708,
      21.959440559440566,
      16.87832167832169,
      23.65314685314685,
      23.65314685314685,
      25.346853146853142,
      21.112587412587416,
      20.265734265734274,
      18.572027972027982,
      22.806293706293708,
      19.418881118881128,
      31.274825174825168,
      31.274825174825168,
      27.04055944055944,
      22.806293706293708,
      22.806293706293708,
      20.265734265734274,
      20.265734265734274,
      19.418881118881128,
      27.04055944055944,
      29.581118881118876,
      23.65314685314685,
      21.112587412587416,
      21.112587412587416,
      28.734265734265726,
      28.734265734265726,
      27.04055944055944,
      27.04055944055944,
      23.65314685314685,
      26.193706293706292,
      24.5,
      19.418881118881128,
      18.572027972027982,
      16.87832167832169,
      16.031468531468544,
      21.959440559440566,
      32.12167832167831,
      33.8153846153846,
      33.8153846153846,
      30.427972027972018,
      26.193706293706292,
      21.959440559440566,
      32.96853146853145,
      29.581118881118876,
      28.734265734265726
    ],
    "lower": [
      -2.631127988765364,
      -2.631127988765364,
      -2.631127988765364,
      -4.361980086782353,
      -5.255194190754292,
      -10.995362214132872,
      -3.4872723529185095,
      -3.4872723529185095,
      -1.793566059212214,
      -6.166820311076076,
      -7.096727692167416,
      -9.010689336356865,
      -4.361980086782353,
      -8.044750478519667,
      3.555336990748202,
      3.555336990748202,
      -0.17407530963541262,
      -4.361980086782353,
      -4.361980086782353,
      -7.096727692167416,
      -7.096727692167416,
      -8.044750478519667,
      -0.17407530963541262,
      2.1174872837180843,
      -3.4872723529185095,
      -6.166820311076076,
      -6.166820311076076,
      1.3718037763640396,
      1.3718037763640396,
      -0.17407530963541262,
      -0.17407530963541262,
      -3.4872723529185095,
      -0.974567499369769,
      -2.631127988765364,
      -8.044750478519667,
      -9.010689336356865,
      -10.995362214132872,
      -12.01354849049396,
      -5.255194190754292,
      4.2479944292237555,
      5.58220903656882,
      5.58220903656882,
      2.8452547195871745,
      -0.974567499369769,
      -5.255194190754292,
      4.923514446568955,
      2.1174872837180843,
      1.3718037763640396
    ],
    "upper": [
      51.631127988765364,
      51.631127988765364,
      51.631127988765364,
      49.97456749936977,
      49.17407530963543,
      44.75200557077625,
      50.79356605921221,
      50.79356605921221,
      52.487272352918495,
      48.39199513625091,
      47.62819622363597,
      46.154745280412826,
      49.97456749936977,
      46.88251271628192,
      58.99431335890213,
      58.99431335890213,
      54.255194190754295,
      49.97456749936977,
      49.97456749936977,
      47.62819622363597,
      47.62819622363597,
      46.88251271628192,
      54.255194190754295,
      57.04475047851967,
      50.79356605921221,
      48.39199513625091,
      48.39199513625091,
      56.09672769216741,
      56.09672769216741,
      54.255194190754295,
      54.255194190754295,
      50.79356605921221,
      53.36198008678235,
      51.631127988765364,
      46.88251271628192,
      46.154745280412826,
      44.75200557077625,
      44.07648555343105,
      49.17407530963543,
      59.99536221413287,
      62.048560194200384,
      62.048560194200384,
      58.01068933635686,
      53.36198008678235,
      49.17407530963543,
      61.013548490493946,
      57.04475047851967,
      56.09672769216741
    ],
    "se_pred": [
      13.478656321435652,
      13.478656321435652,
      13.478656321435652,
      13.497110236447757,
      13.520142209463984,
      13.847555684168531,
      13.483272168032457,
      13.483272168032457,
      13.483272168032457,
      13.552321212440296,
      13.593582286428827,
      13.70300442963456,
      13.497110236447757,
      13.643843034951209,
      13.770951756741614,
      13.770951756741614,
      13.520142209463982,
      13.497110236447757,
      13.497110236447757,
      13.593582286428827,
      13.593582286428827,
      13.643843034951209,
      13.520142209463982,
      13.643843034951207,
      13.483272168032457,
      13.552321212440296,
      13.552321212440296,
      13.593582286428825,
      13.593582286428825,
      13.520142209463982,
      13.520142209463982,
      13.483272168032457,
      13.497110236447757,
      13.478656321435652,
      13.643843034951209,
      13.70300442963456,
      13.847555684168531,
      13.93267342678763,
      13.520142209463984,
      13.84755568416853,
      14.0261499870992,
      14.0261499870992,
      13.703004429634559,
      13.497110236447757,
      13.520142209463984,
      13.932673426787629,
      13.643843034951207,
      13.593582286428825
    ],
    "leverage": [
      0.02083333333333336,
      0.020833333333333346,
      0.02083333333333335,
      0.02363053613053616,
      0.02712703962703967,
      0.07747668997669009,
      0.021532634032634057,
      0.021532634032634057,
      0.021532634032634036,
      0.03202214452214458,
      0.0383158508158509,
      0.05509906759906767,
      0.02363053613053616,
      0.04600815850815858,
      0.06558857808857804,
      0.06558857808857804,
      0.02712703962703962,
      0.02363053613053616,
      0.02363053613053616,
      0.0383158508158509,
      0.0383158508158509,
      0.04600815850815858,
      0.02712703962703962,
      0.04600815850815847,
      0.021532634032634057,
      0.03202214452214458,
      0.03202214452214458,
      0.03831585081585076,
      0.03831585081585076,
      0.02712703962703962,
      0.02712703962703962,
      0.021532634032634057,
      0.023630536130536135,
      0.02083333333333335,
      0.04600815850815858,
      0.05509906759906767,
      0.07747668997669009,
      0.09076340326340335,
      0.02712703962703967,
      0.07747668997668986,
      0.10544871794871782,
      0.10544871794871782,
      0.05509906759906755,
      0.023630536130536135,
      0.02712703962703967,
      0.09076340326340315,
      0.04600815850815847,
      0.03831585081585076
    ]
  },
  "extrapolation": {
    "new_x": {
      "value": [
        3.71,
        4.55,
        5.6
      ]
    },
    "predicted": [
      35.59377622377621,
      42.70734265734263,
      51.599300699300656
    ],
    "lower": [
      6.912210159416375,
      11.57557294900548,
      16.209347126946092
    ],
    "upper": [
      64.27534228813604,
      73.83911236567978,
      86.98925427165523
    ],
    "se_pred": [
      14.24890892491235,
      15.466162142263835,
      17.58161406451123
    ],
    "leverage": [
      0.14084032634032642,
      0.34408508158508183,
      0.7369172494172499
    ]
  }
}