Skip to main content

Tiny sklearn-based AutoML tool.

Project description

tiresia

Installation

pip install tiresia

Description

tiresia is just a wrapper around scikit-learn GridSearchCV. The idea is to simplify the model testing workflow. With tiresia you can choose which models to test and to exclude and provide a param_grid for the ones you want to explore deeper, while keeping the parameters of the less interesting ones on default.

Example

from tiresia.predictor import AutoPredictor

from sklearn.datasets import make_regression, make_classification
from sklearn.model_selection import train_test_split
from sklearn.metrics import roc_auc_score, r2_score

test_type = "regressor"

if test_type == "classifier":
    train, target = make_classification(5000, 20)
elif test_type == "regressor":
    train, target = make_regression(5000, 20)

x_train, x_test, y_train, y_test = train_test_split(train, target, test_size=0.3)

autopred = AutoPredictor(estimator_type=test_type,
                         scoring=r2_score,
                         greater_is_better=True)
autopred.fit(x_train, y_train, x_test, y_test)

predictions = autopred.predictions
results     = autopred.results

print(results)

                        REGRESSOR r2_score
18                        LassoCV    1.000
12                 HuberRegressor    1.000
23                      LinearSVR    1.000
22               LinearRegression    1.000
21                    LassoLarsIC    1.000
20                    LassoLarsCV    1.000
29                RANSACRegressor    1.000
17                          Lasso    1.000
16                         LarsCV    1.000
15                           Lars    1.000
14                    KernelRidge    1.000
28     PassiveAggressiveRegressor    1.000
31                          Ridge    1.000
32                        RidgeCV    1.000
33                   SGDRegressor    1.000
35     TransformedTargetRegressor    1.000
2                   BayesianRidge    1.000
24                   MLPRegressor    0.998
6                    ElasticNetCV    0.992
11  HistGradientBoostingRegressor    0.957
10      GradientBoostingRegressor    0.925
5                      ElasticNet    0.881
8             ExtraTreesRegressor    0.853
27    OrthogonalMatchingPursuitCV    0.827
30          RandomForestRegressor    0.824
1                BaggingRegressor    0.794
0               AdaBoostRegressor    0.751
36               TweedieRegressor    0.743
13            KNeighborsRegressor    0.686
3           DecisionTreeRegressor    0.486
26      OrthogonalMatchingPursuit    0.387
7              ExtraTreeRegressor    0.386
34                            SVR    0.357
19                      LassoLars    0.353
25                          NuSVR    0.285
9        GaussianProcessRegressor    0.038
4                  DummyRegressor   -0.003

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

tiresia-0.0.11.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

tiresia-0.0.11-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file tiresia-0.0.11.tar.gz.

File metadata

  • Download URL: tiresia-0.0.11.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for tiresia-0.0.11.tar.gz
Algorithm Hash digest
SHA256 af115596e277a7fbd13a52b127415dafca69435c5beac074f63bf1aff2e83c41
MD5 3498c8dbc13e3e98489cdb1a55042ff0
BLAKE2b-256 7d987be29b756f00e70f70e78aef24846a862080a676db69eb7f940ccbd741da

See more details on using hashes here.

File details

Details for the file tiresia-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: tiresia-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for tiresia-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 7d3eb48713bbe1226b2d88536c72edae6aa1eb1742c65f4bfde5d3e0d5d8f31b
MD5 6efcd258abb2bb445a9c171fd8ea0644
BLAKE2b-256 566319f716c9a2e5fd7da83fe1a8d1f99a2411bfc67400230434ae6003ec7010

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