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 details)

Uploaded Source

Built Distribution

model_arena-0.0.4-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: model_arena-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 25fb29944c0d721f29636b12fab0333bf9be204c9ca06ed497267e0a1159669d
MD5 6d477b44ddb25ff3390f089305a54d3b
BLAKE2b-256 06a63faa304a90f30eebd3e1624af18130570e2eade175b5f0d2aa6af510e220

See more details on using hashes here.

File details

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

File metadata

  • Download URL: model_arena-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6340d0b0f90932c8f95b967270eae73e212401fb1efce4d60654948239aefc91
MD5 0745e436f02724f35803a4cb516dbedc
BLAKE2b-256 e67c1e83e8c31eaa790d3d6c5abf3064f938c118f5bd96a0c6b43e5ca5491479

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