The skippy python package
Skip the boilerplate of scikit-learn machine learning examples.
Installation
pip install skippy
Usage
In a shell environment, you can run skippy
with no arguments to perform a Logistic Regression
on the digits dataset.
This will produce a 10 x 10 confusion matrix with the Accuracy Score at the top.
You can also pass arguments to skippy at the command line.
For example,
skippy -data diabetes -type linear_model -name Lasso
# Or
skippy -d diabetes -t linear_model -n Lasso
will run a linear regression with lasso regularization (L1)
on the diabetes dataset.
The data argument can be any of
the following built-in scikit-learn datasets:
- Regression
bostondiabetes
- Classification
digitsiriswinebreast_cancer
The type and name arguments are
referring to the model type and name from scikit-learn.
The type is the submodule, e.g.
linear_modelnaive_bayesensemblesvm
while the name is the what is actually imported, e.g.
LinearRegressionGaussianNBRandomForestRegressorSVC
Simplify code to a single function call per step:
from sklearn.metrics import confusion_matrix, accuracy_score
import skippy as skp
data = skp.get_data('digits')
x_train, x_test, y_train, y_test = skp.split_data(data)
model = skp.get_model(model_type='ensemble',
model_name='RandomForestClassifier')
fit = model.fit(x_train, y_train)
skp.pickle_model(filename='digits_rf.pickle', model=fit)
predictions = fit.predict(x_test)
confmat = confusion_matrix(y_true=y_test, y_pred=predictions)
accuracy = accuracy_score(y_true=y_test, y_pred=predictions)
skp.confusion_matrix_plot(cm=confmat,
acc=accuracy,
filename='digits_rf.png')
Or run a whole pipeline with one function:
import skippy as skp
skp.classification(dataset='digits',
model_type='ensemble',
model_name='RandomForestClassifier',
pickle_name='digits_rf.pickle',
plot_name='digits_rf.png')
For inspiration, look at the example pipelines in the pipelines folder of the skippy repo.
Metadata
Release files for skippy 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| skippy-0.1.0.tar.gz | 4.1 kB | Without provenance | Details for skippy-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| skippy-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for skippy-0.1.0-py3-none-any.whl |
Total release size: 10.3 kB
Release files / skippy-0.1.0.tar.gz
| Download URL | skippy-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5ff4b02d5bd75ffab0eda30da10c4f7da6fb9ec216b80fc7c6f72df18a72d19a
|
|
BLAKE2b-256 checksum How to use checksums |
446a7324798624222bbc555e61ba534673764846a40f4a71cf513d32f323382f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Release files / skippy-0.1.0-py3-none-any.whl
| Download URL | skippy-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1fe46c59817f47ddf73a3b2b19f5605698601a3fad7027ce5f5a71a31f1ea75
|
|
BLAKE2b-256 checksum How to use checksums |
a4cb346f34fc87fab0d9aa643432dbd22d8ffe798e68ea777c081f107d8c0192
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Security for skippy 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.