Skip to main content

A Python package to implement stepwise regression

Project description

Stepwise Regression

A python package which executes linear regression forward and backward

Usage

The package can be imported and the functions

forward_regression:

Performs a forward feature selection based on p-value from statsmodels.api.OLS Arguments: X - pandas.DataFrame with candidate features y - list-like with the target threshold_in - include a feature if its p-value < threshold_in verbose - whether to print the sequence of inclusions and exclusions Returns: list of selected features

backward_regression:

Performs a forward feature selection based on p-value from statsmodels.api.OLS Arguments: X - pandas.DataFrame with candidate features y - list-like with the target threshold_out - exclude a feature if its p-value > threshold_out verbose - whether to print the sequence of inclusions and exclusions Returns: list of selected features

can be used

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stepwise-regression-1.0.3.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

stepwise_regression-1.0.3-py3-none-any.whl (3.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page