stepshift
Stepshift is a package that implements the stepshifting algorithm described in appendix A of
Hegre et al. (2020).
Installation
Stepshift is currently only distributed as a source distribution, which means that the end user needs a C compiler. This means that OSX users need to have Xcode installed on their system before proceeding. In addition, the numpy requirement is quite strict, since stepshift uses the Numpy C API via Cython.
Install by running:
pip install stepshift
Usage
Stepshift has a module called stepshift.views which contains a class called
StepshiftedModels. This class wraps the stepshifting procedure, exposing a
simple, Scikit-Learn-like (but not equivalent) API. The model takes three
arguments: A scikit learn estimator, a list containing integers, which denotes
the steps, and a string variable which is the name of the dependent variable:
from sklearn.linear_model import LogisticRegression
from stepshift.views import StepshiftedModels
mdl = StepshiftedModels(LogisticRegression(),[1,2,3,4,5,6,7,8],"outcome")
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file stepshift-2.2.6.tar.gz.
File metadata
- Download URL: stepshift-2.2.6.tar.gz
- Upload date:
- Size: 166.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/5.1.1 CPython/3.8.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
398681a585c44eb056612b009ad0e3f6d48eb6a9be36f7fc911c8c0dd91af048
|
|
| MD5 |
53eb8d9bd8a5718122184d1750bb4761
|
|
| BLAKE2b-256 |
c8fa29c737319bffc9defb1d86a2d0a4caa8b2780ace0abcf11ee2f5ee1d8126
|