5 ms·
I authored this package as I needed to generate confidence intervals for time series data without using SciPy. Sharing this here, as this could be a useful pack
by codeboy7432 4y ago
I authored this package as I needed to generate confidence intervals for time series data without using SciPy. Sharing this here, as this could be a useful package for others :)
Included Models:
- Linear regression
- Ridge regression
- Linear spline
- Isotonic regression
- Bin regression
- Cubic spline
- Natural cubic spline
- Exponential moving average
- Kernel functions (Gaussian, KNN, Weighted average)
- t6jvcereio 4y agoTwo questions: Why the requirement that you can't use scipy? Have you heard of the package stats model?
- versteegen 4y agoWell, SciPy depends heavily on NumPy, which as a CPython-specific extension won't run on other Python interpreters in general. Although for example there is ulab for MicroPython which replicates part of NumPy, and PyPy has a compatibility layer for CPython extensions. Edit: well, Regessio itself also depends on NumPy, but might be able to run on top of ulab whereas I really doubt SciPy would.
- nothrowaways 4y agoThe repo on OP also depends on numpy
- t6jvcereio 4y agoResponding that there's something out there called ulab doesn't really answer my question, which was: where does op's requirement to not use scipy come from.
- codeboy7432 4y ago(Same as comment above) ".. I had to generate confidence intervals on over 8000 univariate data sets using very small VMs, so I needed to limit large dependancies as much as I could. This package was the result of this!" Based on the comments in this thread, it may be worth trying to make this package not dependant on Numpy as well?
- gkhartman 4y agoThanks for releasing this. I was just wondering if something like this exists. I've worked on a few projects where scipy was banned due to the large dependencies it pulls in.
- clircle 4y agoHave you compared these to StatsModels? Or R? (which includes most of these ootb)
- codeboy7432 4y agoI did look into stats models, but this was a large library with more than I needed. I did not look into R.. Are there any lightweight alternatives in this language?
- clircle 4y agoI think most or all of these models are in the R Standard lib
- wdkrnls 4y agomgcv also provides many more varieties of splines than base R.
- wdkrnls 4y agoNot all as far as I know. For ridge regression you will want to install glmnet, for example. mgcv which is usually shipped with R provides access to a few common fast kernels which seem to be the ones python programmers are familiar with.
- clircle 4y agoCan use lm.ridge from MASS instead of glmnet, but yeah there’s going to be some smoother not in R standard library
- iamcreasy 4y agoAm I guess correct to assume that you could not use sklearn/scikit as well because it depends on SciPy? (I am under the impression that sklearn/scikit is the dominant library for an implementation of these algorithms.)
- codeboy7432 4y agoThat is correct. I had to generate confidence intervals on over 8000 univariate data sets using very small VMs, so I needed to limit large dependancies as much as I could. This package was the result of this!