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.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

model_arena-0.0.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file model_arena-0.0.2.tar.gz.

File metadata

  • Download URL: model_arena-0.0.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4

File hashes

Hashes for model_arena-0.0.2.tar.gz
Algorithm Hash digest
SHA256 718300cd6a29eb26195959793f4dfe92f2aed8875cf83ed0b9d807c026ab9839
MD5 084e4bb8b3c9e9423c48718b73cc6e83
BLAKE2b-256 4560be6f99463ace18c3651d47285669bdfafb052334cd6d2dd21584049414ae

See more details on using hashes here.

File details

Details for the file model_arena-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: model_arena-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.4

File hashes

Hashes for model_arena-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8def0d434fb575c5b4fa375ece0f83bb827898421fb505942bd3995e4c0b0619
MD5 e2f57e05e477eb31f94a907b62893c7b
BLAKE2b-256 0ded3a1944d80c40bfadbe485896b01e5d9fa10d5d26399efc9fd119dd4f61b6

See more details on using hashes here.

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