Skip to main content

`superml` is a shortcut to ML. A wrapper of scikit-learn, etc.

Project description

Intro

Tired of trying out all kinds of ML models when starting a new project. Try superml.

superml is a shortcut to ML. A wrapper of scikit-learn, etc.

Getting Started

Classification

The SuperClassifier module currently supports:

  • "SVM"
  • "LogisticRegression"
  • "KNN"
  • "RandomForest"
  • "AdaBoost"
  • "NaiveBayes"

It is super easy to start by copy-paste:

from sklearn import datasets
from sklearn.model_selection import train_test_split

from superml import SuperClassifier
from superml import DEFAULT_CLASSIFIERS


X, y = datasets.load_iris(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.33, random_state=42)
sclf = SuperClassifier(classifiers=DEFAULT_CLASSIFIERS)
sclf.fit(X_train, y_train)
sclf.evaluate(X=X_test, y=y_test, print_report=True)

Output right away:

SVM classification report: 
               precision    recall  f1-score   support

           0       1.00      1.00      1.00        19
           1       1.00      1.00      1.00        15
           2       1.00      1.00      1.00        16

    accuracy                           1.00        50
   macro avg       1.00      1.00      1.00        50
weighted avg       1.00      1.00      1.00        50

LogisticRegression classification report: 
               precision    recall  f1-score   support

           0       1.00      1.00      1.00        19
           1       1.00      1.00      1.00        15
           2       1.00      1.00      1.00        16

    accuracy                           1.00        50
   macro avg       1.00      1.00      1.00        50
weighted avg       1.00      1.00      1.00        50

KNN classification report: 
               precision    recall  f1-score   support

           0       1.00      1.00      1.00        19
           1       0.94      1.00      0.97        15
           2       1.00      0.94      0.97        16

    accuracy                           0.98        50
   macro avg       0.98      0.98      0.98        50
weighted avg       0.98      0.98      0.98        50

RandomForest classification report: 
               precision    recall  f1-score   support

           0       1.00      1.00      1.00        19
           1       0.94      1.00      0.97        15
           2       1.00      0.94      0.97        16

    accuracy                           0.98        50
   macro avg       0.98      0.98      0.98        50
weighted avg       0.98      0.98      0.98        50

AdaBoost classification report: 
               precision    recall  f1-score   support

           0       1.00      1.00      1.00        19
           1       0.79      1.00      0.88        15
           2       1.00      0.75      0.86        16

    accuracy                           0.92        50
   macro avg       0.93      0.92      0.91        50
weighted avg       0.94      0.92      0.92        50

NaiveBayes classification report: 
               precision    recall  f1-score   support

           0       1.00      1.00      1.00        19
           1       0.93      0.93      0.93        15
           2       0.94      0.94      0.94        16

    accuracy                           0.96        50
   macro avg       0.96      0.96      0.96        50
weighted avg       0.96      0.96      0.96        50

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

superml-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file superml-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: superml-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.4

File hashes

Hashes for superml-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2428e6dd6548434482cd7ec425f1b63d8071683f7e1bbde7761da9c621833997
MD5 c523dde0f3b9bc4b48fc29d28f48d03c
BLAKE2b-256 e2f72d0a04bae7c7a8f92952f0d60f75eac967aea3506cb36dd36a8250da1ea2

See more details on using hashes here.

Supported by

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