Regression
Performs model training, testing, evaluations and deployment
- deploy_model(estimator_name, host='localhost', port=8000)[source]
- estimator_namestr
Name of the estimator to be deployed
- host{str, IPv4 or IPv6}, default=’localhost’
Hostname or IP address of the machine where the API will be deployed
- portint, default=8000
API listening port
- get_estimators(multi_output=False, multi_task=False, names_only=True)[source]
Returns the list of available regression estimators
- multi_outputbool, default=False
Future use
- multi_taskbool, default=False
Future use
- names_onlybool, default=True
Returns only the estimator name without metadata
- train_test_evaluate(X_train, X_test, y_train, y_test, tune_models=None, metrics='default', multi_output=False, multi_task=False, target_scaling_strategy=None, save_pipeline_to_disk=True, experiment_name=None, run_name=None)[source]
Trains the data on the given dataset, evaluate the models and returns comparison metrics
- X_trainpandas dataframe
Training data
- X_testpandas dataframe
Test data
- y_trainarray of shape (X_train.shape[0],)
Target values of training dataset
- y_testarray of shape (X_test.shape[0],)
Target values of test dataset
- tune_models{‘all’, None} or list of models to be trained, default=None
all: tune all regression models list: list of models to be trained None: hyperparameter tuning will not be performed
- metrics{‘all’, ‘default’}, default=’default’
- all:
mean_absolute_error, mean_squared_error, r2_score, explained_variance_score, max_error, mean_squared_log_error, median_absolute_error, mean_absolute_percentage_error, mean_poisson_deviance, mean_gamma_deviance, mean_tweedie_deviance, d2_tweedie_score, mean_pinball_loss
- default:
mean_absolute_error, mean_squared_error, r2_score
- multi_outputbool, default=False
Future use
- multi_taskbool, default=False
Future use
- target_scaling_strategy{‘StandardScaler’, ‘MinMaxScaler’, ‘MaxAbsScaler’, ‘RobustScaler’, None}, default=None
Scales the target variable before training the model
- save_pipeline_to_diskbool, default=True
Save preprocessor and model training pipeline to the disk. Should be set to True if needs model to be deployed as an API
- experiment_namestr, default=None
Name of the experiment
- run_namestr,default=None
Name of the run within the experiment
Examples
Regression
regression_hyperparameter_tuning In [ ]:pip install bluemist
In [1]:from sklearn import datasets from bluemist.environment import initialize from bluemist.datasource import get_data_from_filesystem from bluemist.preprocessing import preprocess_data from bluemist.regression import train_test_evaluate
In [2]:initialize() data = get_data_from_filesystem('https://raw.githubusercontent.com/plotly/datasets/3aa08e58607d1f36159efc4cca9d0d073bbf57bb/auto-mpg.csv') data.head()
██████╗ ██╗ ██╗ ██╗███████╗███╗ ███╗██╗███████╗████████╗ █████╗ ██╗ ██╔══██╗██║ ██║ ██║██╔════╝████╗ ████║██║██╔════╝╚══██╔══╝ ██╔══██╗██║ ██████╔╝██║ ██║ ██║█████╗ ██╔████╔██║██║███████╗ ██║ ███████║██║ ██╔══██╗██║ ██║ ██║██╔══╝ ██║╚██╔╝██║██║╚════██║ ██║ ██╔══██║██║ ██████╔╝███████╗╚██████╔╝███████╗██║ ╚═╝ ██║██║███████║ ██║ ██║ ██║██║ (version 0.1.1) Bluemist path :: /home/shashank-agrawal/anaconda3/envs/bluemist-test-2/lib/python3.9/site-packages/bluemist System platform :: posix, Linux, 5.19.0-31-generic, linux-x86_64, ('64bit', 'ELF')Out[2]:mpg cylinders displacement horsepower weight acceleration model_year 0 18.0 8 307.0 130.0 3504 12.0 70 1 15.0 8 350.0 165.0 3693 11.5 70 2 18.0 8 318.0 150.0 3436 11.0 70 3 16.0 8 304.0 150.0 3433 12.0 70 4 17.0 8 302.0 140.0 3449 10.5 70 In [3]:# Categorical encoding using OneHotEncoder X_train, X_test, y_train, y_test = preprocess_data(data, target_variable='mpg', data_scaling_strategy='StandardScaler', categorical_features=['model_year'], categorical_encoder='OneHotEncoder', drop_categories_one_hot_encoder='first') X_train.head()
Out[3]:cylinders displacement horsepower weight acceleration model_year_71 model_year_72 model_year_73 model_year_74 model_year_75 model_year_76 model_year_77 model_year_78 model_year_79 model_year_80 model_year_81 model_year_82 0 -0.83336 -0.907666 -0.849167 -1.339614 -1.222913 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 1 -0.83336 -0.829817 -1.062608 -0.870397 -0.263143 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 2 -0.83336 -1.024438 -0.875847 -1.195240 0.412250 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 3 -0.83336 -0.907666 -0.395605 -0.793398 1.194285 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 4 -0.83336 -0.683851 -0.395605 0.398895 2.225149 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 In [4]:# Train and compare models train_test_evaluate(X_train, X_test, y_train, y_test)
Training TweedieRegressor: 100%|██████████| 46/46 [00:26<00:00, 1.73it/s]mean_absolute_error mean_squared_error r2_score Estimator ARDRegression 2.256667 8.194630 0.849847 AdaBoostRegressor 2.589514 11.544786 0.788460 BaggingRegressor 2.075500 8.978287 0.835487 BayesianRidge 2.305722 8.464032 0.844910 CCA 2.666047 11.255903 0.793754 DecisionTreeRegressor 2.570000 11.356600 0.791908 DummyRegressor 6.386631 55.425677 -0.015587 ElasticNet 3.027509 15.358260 0.718584 ElasticNetCV 2.327361 8.477487 0.844664 ExtraTreeRegressor 2.475000 12.482500 0.771278 ExtraTreesRegressor 1.647550 6.147960 0.887348 GammaRegressor 2.884864 14.504004 0.734237 GaussianProcessRegressor 4.758763 70.758601 -0.296538 GradientBoostingRegressor 2.049585 8.927605 0.836416 HistGradientBoostingRegressor 1.975980 7.834050 0.856454 HuberRegressor 2.178780 7.930182 0.854692 KNeighborsRegressor 2.113800 7.738356 0.858207 KernelRidge 4.270037 43.464550 0.203582 Lars 2.606594 12.785552 0.765725 LarsCV 2.501025 11.607143 0.787318 Lasso 2.933188 14.458799 0.735066 LassoCV 2.270614 8.378751 0.846473 LassoLars 2.933223 14.458541 0.735070 LassoLarsCV 2.270610 8.379307 0.846463 LassoLarsIC 2.276349 8.322669 0.847500 LinearRegression 2.294341 8.472032 0.844764 LinearSVR 2.207200 8.495899 0.844326 MLPRegressor 4.640779 32.390917 0.406488 NuSVR 2.126710 8.719420 0.840231 OrthogonalMatchingPursuit 3.029635 14.888476 0.727192 OrthogonalMatchingPursuitCV 2.336884 8.764258 0.839409 PLSCanonical 8.720938 120.612123 -1.210024 PLSRegression 2.517296 9.824553 0.819981 PassiveAggressiveRegressor 2.387875 10.818580 0.801767 PoissonRegressor 1.925364 6.555547 0.879880 QuantileRegressor 6.322000 54.606000 -0.000568 RANSACRegressor 2.310333 10.757303 0.802890 RadiusNeighborsRegressor 1.920274 7.350697 0.871168 RandomForestRegressor 1.952540 7.893172 0.855370 Ridge 2.305583 8.463796 0.844914 RidgeCV 2.282064 8.445197 0.845255 SGDRegressor 2.309441 8.528790 0.843724 SVR 2.028735 8.102731 0.851530 TheilSenRegressor 2.341294 9.388071 0.827979 TransformedTargetRegressor 2.294341 8.472032 0.844764 TweedieRegressor 2.993400 15.195929 0.721559 In [5]:# Hyperparameter tuning train_test_evaluate(X_train, X_test, y_train, y_test, tune_models=['PLSCanonical', 'KernelRidge'])
Training PLSCanonical: 100%|██████████| 2/2 [00:37<00:00, 18.94s/it]mean_absolute_error mean_squared_error r2_score Estimator KernelRidge 1.762374 5.959747 0.890797 PLSCanonical 4.928449 33.450465 0.387074 In [ ]:# After hyperparameter tuning all error parameters reduced for KernelRidge and PLSCanonicalIn [ ]:
GPU Acceleration
If your system is equipped with an NVIDIA GPU and you want to utilize GPU acceleration for model training, you can install the RAPIDS cuML package by executing the following command:
pip install cudf-cu11 cuml-cu11 --extra-index-url=https://pypi.nvidia.com
The cuml package provides GPU-accelerated implementations of various machine learning algorithms. By installing this package, you can leverage the power of your GPU to significantly improve the speed and performance of your machine learning workflows.
For the list of supported algorithms, please refer https://docs.rapids.ai/api/cuml/stable/api/#regression-and-classification
Acceleration extensions can ben enabled by passing the parameter
enable_acceleration_extensions=Trueduring theinitializephase.
pip install -U bluemist
pip install cudf-cu11 cuml-cu11 --extra-index-url=https://pypi.nvidia.com
from bluemist.environment import initialize
from bluemist.datasource import get_data_from_filesystem
from bluemist.preprocessing import preprocess_data
from bluemist.regression import train_test_evaluate
initialize(enable_acceleration_extensions=True)
data = get_data_from_filesystem('https://raw.githubusercontent.com/plotly/datasets/3aa08e58607d1f36159efc4cca9d0d073bbf57bb/auto-mpg.csv')
data.head()
██████╗ ██╗ ██╗ ██╗███████╗███╗ ███╗██╗███████╗████████╗ █████╗ ██╗
██╔══██╗██║ ██║ ██║██╔════╝████╗ ████║██║██╔════╝╚══██╔══╝ ██╔══██╗██║
██████╔╝██║ ██║ ██║█████╗ ██╔████╔██║██║███████╗ ██║ ███████║██║
██╔══██╗██║ ██║ ██║██╔══╝ ██║╚██╔╝██║██║╚════██║ ██║ ██╔══██║██║
██████╔╝███████╗╚██████╔╝███████╗██║ ╚═╝ ██║██║███████║ ██║ ██║ ██║██║
(version 0.1.2 - ThunderBurst)
Bluemist path :: /app/anaconda3/envs/bluemist-test-2/lib/python3.9/site-packages/bluemist
System platform :: posix, Linux, 5.15.0-75-generic, linux-x86_64, ('64bit', 'ELF')
GPU Brand :: NVIDIA
CPU Brand :: GenuineIntel
cuML version 23.06.00
NVIDIA GPU support is available via RAPIDS cuML 23.06.00
CPU Acceleration enabled via Intel® Extension for Scikit-learn
Intel(R) Extension for Scikit-learn* enabled (https://github.com/intel/scikit-learn-intelex)
| mpg | cylinders | displacement | horsepower | weight | acceleration | model_year | |
|---|---|---|---|---|---|---|---|
| 0 | 18.0 | 8 | 307.0 | 130.0 | 3504 | 12.0 | 70 |
| 1 | 15.0 | 8 | 350.0 | 165.0 | 3693 | 11.5 | 70 |
| 2 | 18.0 | 8 | 318.0 | 150.0 | 3436 | 11.0 | 70 |
| 3 | 16.0 | 8 | 304.0 | 150.0 | 3433 | 12.0 | 70 |
| 4 | 17.0 | 8 | 302.0 | 140.0 | 3449 | 10.5 | 70 |
# Categorical encoding using OneHotEncoder
X_train, X_test, y_train, y_test = preprocess_data(data,
target_variable='mpg',
data_scaling_strategy='StandardScaler',
categorical_features=['model_year'],
categorical_encoder='OneHotEncoder',
drop_categories_one_hot_encoder='first')
X_train.head()
| cylinders | displacement | horsepower | weight | acceleration | model_year_71 | model_year_72 | model_year_73 | model_year_74 | model_year_75 | model_year_76 | model_year_77 | model_year_78 | model_year_79 | model_year_80 | model_year_81 | model_year_82 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | -0.844932 | -0.979599 | -0.978045 | -1.206109 | 0.726703 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 |
| 1 | -0.844932 | -0.706306 | -0.196027 | -0.811582 | -0.314266 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 2 | -1.435988 | -1.086964 | 0.154533 | -0.309456 | -0.745012 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 3 | 1.519291 | 1.548358 | 1.098348 | 1.206486 | -0.924490 | 0.0 | 0.0 | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 4 | -0.844932 | -1.038161 | -1.058943 | -1.200131 | 1.372822 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.0 |
# Train and compare models
train_test_evaluate(X_train, X_test, y_train, y_test)
Training TweedieRegressor: 100%|██████████| 46/46 [00:06<00:00, 6.68it/s]
| Execution Device | Execution Time | mean_absolute_error | mean_squared_error | r2_score | |
|---|---|---|---|---|---|
| Estimator | |||||
| ARDRegression | CPU | 00:00:00,072 | 2.444425 | 10.462496 | 0.861773 |
| AdaBoostRegressor | CPU | 00:00:00,108 | 2.885664 | 15.533464 | 0.794777 |
| BaggingRegressor | CPU | 00:00:00,038 | 2.537500 | 14.702837 | 0.805751 |
| BayesianRidge | CPU | 00:00:00,010 | 2.585184 | 11.206041 | 0.851950 |
| CCA | CPU | 00:00:00,013 | 2.529145 | 10.105854 | 0.866485 |
| DecisionTreeRegressor | CPU | 00:00:00,009 | 2.795000 | 17.682500 | 0.766385 |
| DummyRegressor | CPU | 00:00:00,005 | 7.319987 | 75.709757 | -0.000252 |
| ElasticNet | NVIDIA GPU Acceleration | 00:00:00,272 | 3.834164 | 25.997974 | 0.656523 |
| ElasticNetCV | CPU | 00:00:00,064 | 2.626248 | 11.566699 | 0.847185 |
| ExtraTreeRegressor | CPU | 00:00:00,008 | 2.706000 | 18.363000 | 0.757394 |
| ExtraTreesRegressor | CPU | 00:00:00,308 | 2.158790 | 11.391634 | 0.849498 |
| GammaRegressor | CPU | 00:00:00,010 | 3.638275 | 24.483145 | 0.676537 |
| GaussianProcessRegressor | CPU | 00:00:00,055 | 5.288209 | 79.897353 | -0.055577 |
| GradientBoostingRegressor | CPU | 00:00:00,127 | 2.187952 | 11.221191 | 0.851749 |
| HistGradientBoostingRegressor | CPU | 00:00:00,225 | 1.958280 | 8.478619 | 0.887983 |
| HuberRegressor | CPU | 00:00:00,018 | 2.423563 | 11.135078 | 0.852887 |
| KNeighborsRegressor | NVIDIA GPU Acceleration | 00:00:00,032 | 2.449000 | 13.304043 | 0.824231 |
| KernelRidge | NVIDIA GPU Acceleration | 00:00:00,722 | 4.431495 | 42.271687 | 0.441521 |
| Lars | CPU | 00:00:00,010 | 6.524132 | 73.860863 | 0.024175 |
| LarsCV | CPU | 00:00:00,024 | 3.856437 | 25.245096 | 0.666470 |
| Lasso | NVIDIA GPU Acceleration | 00:00:00,026 | 3.806500 | 24.729572 | 0.673281 |
| LassoCV | CPU | 00:00:00,063 | 2.475444 | 10.563489 | 0.860439 |
| LassoLars | CPU | 00:00:00,008 | 3.806148 | 24.731295 | 0.673258 |
| LassoLarsCV | CPU | 00:00:00,032 | 2.464901 | 10.506358 | 0.861194 |
| LassoLarsIC | CPU | 00:00:00,013 | 2.463106 | 10.492410 | 0.861378 |
| LinearRegression | NVIDIA GPU Acceleration | 00:00:00,016 | 2.448201 | 10.418300 | 0.862357 |
| LinearSVR | NVIDIA GPU Acceleration | 00:00:00,071 | 2.672447 | 13.399523 | 0.822970 |
| MLPRegressor | CPU | 00:00:00,308 | 3.903790 | 25.253016 | 0.666366 |
| NuSVR | Intel CPU Acceleration | 00:00:00,032 | 2.903896 | 18.017596 | 0.761958 |
| OrthogonalMatchingPursuit | CPU | 00:00:00,007 | 3.551632 | 22.963249 | 0.696617 |
| OrthogonalMatchingPursuitCV | CPU | 00:00:00,012 | 2.578549 | 11.548770 | 0.847421 |
| PLSCanonical | CPU | 00:00:00,020 | 8.119892 | 97.123280 | -0.283160 |
| PLSRegression | CPU | 00:00:00,011 | 2.775743 | 12.969051 | 0.828657 |
| PassiveAggressiveRegressor | CPU | 00:00:00,014 | 3.809542 | 22.579771 | 0.701684 |
| PoissonRegressor | CPU | 00:00:00,012 | 2.361422 | 11.033817 | 0.854225 |
| QuantileRegressor | CPU | 00:00:01,363 | 7.272000 | 76.072600 | -0.005046 |
| RANSACRegressor | CPU | 00:00:00,115 | 2.731283 | 14.981723 | 0.802066 |
| RadiusNeighborsRegressor | CPU | 00:00:00,119 | 2.176538 | 9.793634 | 0.865351 |
| RandomForestRegressor | NVIDIA GPU Acceleration | 00:00:00,999 | 2.366808 | 12.400832 | 0.836164 |
| Ridge | NVIDIA GPU Acceleration | 00:00:00,014 | 2.563803 | 11.069232 | 0.853757 |
| RidgeCV | CPU | 00:00:00,008 | 2.461364 | 10.492994 | 0.861370 |
| SGDRegressor | CPU | 00:00:00,012 | 2.563375 | 11.399026 | 0.849400 |
| SVR | NVIDIA GPU Acceleration | 00:00:00,053 | 2.710197 | 16.571597 | 0.781062 |
| TheilSenRegressor | CPU | 00:00:01,062 | 2.673010 | 13.613295 | 0.820146 |
| TransformedTargetRegressor | CPU | 00:00:00,008 | 2.448201 | 10.418300 | 0.862357 |
| TweedieRegressor | CPU | 00:00:00,011 | 3.795663 | 25.557457 | 0.662343 |
CPU Acceleration
If your system is equipped with an Intel CPU and you want to utilize CPU acceleration for model training, you can install the Intel® Extension for Scikit-learn package by executing the following command:
pip install -U scikit-learn-intelex
The scikit-learn-intelex package provides CPU-accelerated implementations of Scikit-learn algorithms. By installing this package, you can leverage the power of your Intel CPU to significantly improve the speed and performance of your machine learning workflows.
For the list of supported algorithms, please refer to the [Intel® Extension for Scikit-learn documentation](https://intel.github.io/scikit-learn-intelex/algorithms.html#on-cpu).
Acceleration extensions can ben enabled by passing the parameter
enable_acceleration_extensions=Trueduring theinitializephase.
pip install -U bluemist
from bluemist.environment import initialize
from bluemist.datasource import get_data_from_filesystem
from bluemist.preprocessing import preprocess_data
from bluemist.regression import train_test_evaluate
initialize(enable_acceleration_extensions=True)
data = get_data_from_filesystem('https://raw.githubusercontent.com/plotly/datasets/3aa08e58607d1f36159efc4cca9d0d073bbf57bb/auto-mpg.csv')
data.head()
██████╗ ██╗ ██╗ ██╗███████╗███╗ ███╗██╗███████╗████████╗ █████╗ ██╗
██╔══██╗██║ ██║ ██║██╔════╝████╗ ████║██║██╔════╝╚══██╔══╝ ██╔══██╗██║
██████╔╝██║ ██║ ██║█████╗ ██╔████╔██║██║███████╗ ██║ ███████║██║
██╔══██╗██║ ██║ ██║██╔══╝ ██║╚██╔╝██║██║╚════██║ ██║ ██╔══██║██║
██████╔╝███████╗╚██████╔╝███████╗██║ ╚═╝ ██║██║███████║ ██║ ██║ ██║██║
(version 0.1.2 - ThunderBurst)
Bluemist path :: /home/shashank-agrawal/anaconda3/envs/bluemist-test-1/lib/python3.9/site-packages/bluemist
System platform :: posix, Linux, 6.2.0-23-generic, linux-x86_64, ('64bit', 'ELF')
GPU Brand :: Intel
CPU Brand :: GenuineIntel
Intel(R) Extension for Scikit-learn* enabled (https://github.com/intel/scikit-learn-intelex)
CPU Acceleration enabled via Intel® Extension for Scikit-learn
| mpg | cylinders | displacement | horsepower | weight | acceleration | model_year | |
|---|---|---|---|---|---|---|---|
| 0 | 18.0 | 8 | 307.0 | 130.0 | 3504 | 12.0 | 70 |
| 1 | 15.0 | 8 | 350.0 | 165.0 | 3693 | 11.5 | 70 |
| 2 | 18.0 | 8 | 318.0 | 150.0 | 3436 | 11.0 | 70 |
| 3 | 16.0 | 8 | 304.0 | 150.0 | 3433 | 12.0 | 70 |
| 4 | 17.0 | 8 | 302.0 | 140.0 | 3449 | 10.5 | 70 |
# Categorical encoding using OneHotEncoder
X_train, X_test, y_train, y_test = preprocess_data(data,
target_variable='mpg',
data_scaling_strategy='StandardScaler',
categorical_features=['model_year'],
categorical_encoder='OneHotEncoder',
drop_categories_one_hot_encoder='first')
X_train.head()
| cylinders | displacement | horsepower | weight | acceleration | model_year_71 | model_year_72 | model_year_73 | model_year_74 | model_year_75 | model_year_76 | model_year_77 | model_year_78 | model_year_79 | model_year_80 | model_year_81 | model_year_82 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | -0.918670 | -0.759115 | -0.250777 | -0.598948 | -0.353311 | 0.0 | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 1 | 1.426201 | 1.011121 | 0.597420 | 1.237753 | -0.533288 | 0.0 | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 2 | 1.426201 | 0.963788 | 0.597420 | 0.974708 | -0.173334 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| 3 | -0.918670 | -1.080976 | -1.098975 | -1.326937 | 0.330602 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.0 |
| 4 | 0.253765 | 0.471530 | -0.045154 | 0.378241 | -0.353311 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
# Train and compare models
train_test_evaluate(X_train, X_test, y_train, y_test)
Training TweedieRegressor: 100%|██████████| 46/46 [00:30<00:00, 1.50it/s]
| Execution Device | Execution Time | mean_absolute_error | mean_squared_error | r2_score | |
|---|---|---|---|---|---|
| Estimator | |||||
| ARDRegression | CPU | 00:00:00,277 | 2.406122 | 10.765812 | 0.797565 |
| AdaBoostRegressor | CPU | 00:00:00,399 | 2.920736 | 14.090758 | 0.735044 |
| BaggingRegressor | CPU | 00:00:00,126 | 2.436700 | 11.921089 | 0.775841 |
| BayesianRidge | CPU | 00:00:00,036 | 2.410696 | 10.479436 | 0.802949 |
| CCA | CPU | 00:00:00,034 | 2.444255 | 10.948687 | 0.794126 |
| DecisionTreeRegressor | CPU | 00:00:00,040 | 3.099000 | 19.692900 | 0.629704 |
| DummyRegressor | CPU | 00:00:00,017 | 6.040081 | 55.930473 | -0.051691 |
| ElasticNet | Intel CPU Acceleration | 00:00:00,047 | 3.371995 | 19.675705 | 0.630027 |
| ElasticNetCV | CPU | 00:00:00,253 | 2.438893 | 10.509774 | 0.802379 |
| ExtraTreeRegressor | CPU | 00:00:00,036 | 2.901000 | 17.141700 | 0.677675 |
| ExtraTreesRegressor | CPU | 00:00:00,707 | 2.403970 | 12.720501 | 0.760809 |
| GammaRegressor | CPU | 00:00:00,051 | 3.178561 | 17.875722 | 0.663873 |
| GaussianProcessRegressor | CPU | 00:00:00,140 | 6.684252 | 127.258244 | -1.392906 |
| GradientBoostingRegressor | CPU | 00:00:00,308 | 2.517364 | 12.189460 | 0.770795 |
| HistGradientBoostingRegressor | CPU | 00:00:00,739 | 2.230952 | 8.637385 | 0.837587 |
| HuberRegressor | CPU | 00:00:00,077 | 2.533316 | 11.910379 | 0.776043 |
| KNeighborsRegressor | Intel CPU Acceleration | 00:00:00,038 | 2.275600 | 9.556368 | 0.820306 |
| KernelRidge | CPU | 00:00:00,048 | 3.966323 | 32.560759 | 0.387742 |
| Lars | CPU | 00:00:00,063 | 6.864876 | 108.056803 | -1.031851 |
| LarsCV | CPU | 00:00:00,084 | 2.689164 | 12.382666 | 0.767162 |
| Lasso | Intel CPU Acceleration | 00:00:00,036 | 3.248347 | 18.663970 | 0.649051 |
| LassoCV | CPU | 00:00:00,229 | 2.399862 | 10.530851 | 0.801983 |
| LassoLars | CPU | 00:00:00,030 | 3.248325 | 18.662557 | 0.649078 |
| LassoLarsCV | CPU | 00:00:00,126 | 2.396439 | 10.517937 | 0.802226 |
| LassoLarsIC | CPU | 00:00:00,082 | 2.392359 | 10.487008 | 0.802807 |
| LinearRegression | Intel CPU Acceleration | 00:00:00,033 | 2.395951 | 10.505568 | 0.802458 |
| LinearSVR | CPU | 00:00:00,029 | 2.733375 | 13.990561 | 0.736928 |
| MLPRegressor | CPU | 00:00:03,557 | 3.634655 | 20.806037 | 0.608773 |
| NuSVR | Intel CPU Acceleration | 00:00:00,117 | 2.628185 | 12.642558 | 0.762275 |
| OrthogonalMatchingPursuit | CPU | 00:00:00,029 | 3.238316 | 18.884333 | 0.644908 |
| OrthogonalMatchingPursuitCV | CPU | 00:00:00,045 | 2.698984 | 13.233804 | 0.751158 |
| PLSCanonical | CPU | 00:00:00,035 | 7.913519 | 87.614193 | -0.647457 |
| PLSRegression | CPU | 00:00:00,036 | 2.676137 | 12.528321 | 0.764423 |
| PassiveAggressiveRegressor | CPU | 00:00:00,041 | 2.508661 | 11.001611 | 0.793131 |
| PoissonRegressor | CPU | 00:00:00,599 | 2.218186 | 8.937670 | 0.831940 |
| QuantileRegressor | CPU | 00:00:13,020 | 6.178000 | 60.777000 | -0.142823 |
| RANSACRegressor | CPU | 00:00:00,370 | 2.674288 | 13.240134 | 0.751039 |
| RadiusNeighborsRegressor | CPU | 00:00:00,513 | 2.445304 | 11.542569 | 0.788100 |
| RandomForestRegressor | Intel CPU Acceleration | 00:00:00,924 | 2.296135 | 10.473206 | 0.803067 |
| Ridge | Intel CPU Acceleration | 00:00:00,065 | 2.413352 | 10.483357 | 0.802876 |
| RidgeCV | CPU | 00:00:00,039 | 2.397882 | 10.490987 | 0.802732 |
| SGDRegressor | CPU | 00:00:00,068 | 2.401556 | 10.410687 | 0.804242 |
| SVR | Intel CPU Acceleration | 00:00:00,091 | 2.590913 | 12.450987 | 0.765877 |
| TheilSenRegressor | CPU | 00:00:05,493 | 2.491634 | 11.283055 | 0.787839 |
| TransformedTargetRegressor | CPU | 00:00:00,052 | 2.395951 | 10.505568 | 0.802458 |
| TweedieRegressor | CPU | 00:00:00,048 | 3.325007 | 19.101987 | 0.640815 |