Skip to main content

A model extension package

Project description

Models Package

1- Ridge Regression: Extends SKLearns Ridge regression by adding p-values, featureSelection and alpha optimisation.

Example Usage:

Import

from model_arena.Regression import RidgeRegression

Create a RidgeRegression object

rm = RidgeRegression()

Run the feature selection method as above to limit to the most important variables.

Stores the order of variables to the object

rm.featureSelection(X,y)

Find the value of alpha minimising MSE for these features

rm.findBestAlpha(X[rm.bestMeanCVModel],y)

Print the alpha

print('Alpha = {}'.format(rm.alpha))

Fit the model with the best features and the alpha

rm.fit(X[rm.bestMeanCVModel],y)

Display a summary including p-values

rm.summary(X[rm.bestMeanCVModel],y)

To Update PYPI

1- Clone from github

2- Make Changes

3- Update version number in setup.py

4- CD into the setup.py directory

5- Run the following in the CMD: python3 -m pip install --user --upgrade setuptools wheel python3 setup.py sdist bdist_wheel or python -m pip install --user --upgrade setuptools wheel python setup.py sdist bdist_wheel

6- Then the following in the CMD: python3 -m pip install --user --upgrade twine python3 -m twine upload dist/* or python -m pip install --user --upgrade twine python -m twine upload dist/*

7- Test by pip install and importing

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

model_arena-0.0.4.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

model_arena-0.0.4-py3-none-any.whl (5.4 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