@@ -444,8 +444,8 @@ class LazyRegressor:
444444 >>> from sklearn.utils import shuffle
445445 >>> import numpy as np
446446
447- >>> boston = datasets.load_boston ()
448- >>> X, y = shuffle(boston .data, boston .target, random_state=13)
447+ >>> diabetes = datasets.load_diabetes ()
448+ >>> X, y = shuffle(diabetes .data, diabetes .target, random_state=13)
449449 >>> X = X.astype(np.float32)
450450
451451 >>> offset = int(X.shape[0] * 0.9)
@@ -456,50 +456,49 @@ class LazyRegressor:
456456 >>> models, predictions = reg.fit(X_train, X_test, y_train, y_test)
457457 >>> model_dictionary = reg.provide_models(X_train, X_test, y_train, y_test)
458458 >>> models
459- | Model | Adjusted R-Squared | R-Squared | RMSE | Time Taken |
460- |:------------------------------|-------------------:|----------:|------:|-----------:|
461- | SVR | 0.83 | 0.88 | 2.62 | 0.01 |
462- | BaggingRegressor | 0.83 | 0.88 | 2.63 | 0.03 |
463- | NuSVR | 0.82 | 0.86 | 2.76 | 0.03 |
464- | RandomForestRegressor | 0.81 | 0.86 | 2.78 | 0.21 |
465- | XGBRegressor | 0.81 | 0.86 | 2.79 | 0.06 |
466- | GradientBoostingRegressor | 0.81 | 0.86 | 2.84 | 0.11 |
467- | ExtraTreesRegressor | 0.79 | 0.84 | 2.98 | 0.12 |
468- | AdaBoostRegressor | 0.78 | 0.83 | 3.04 | 0.07 |
469- | HistGradientBoostingRegressor | 0.77 | 0.83 | 3.06 | 0.17 |
470- | PoissonRegressor | 0.77 | 0.83 | 3.11 | 0.01 |
471- | LGBMRegressor | 0.77 | 0.83 | 3.11 | 0.07 |
472- | KNeighborsRegressor | 0.77 | 0.83 | 3.12 | 0.01 |
473- | DecisionTreeRegressor | 0.65 | 0.74 | 3.79 | 0.01 |
474- | MLPRegressor | 0.65 | 0.74 | 3.80 | 1.63 |
475- | HuberRegressor | 0.64 | 0.74 | 3.84 | 0.01 |
476- | GammaRegressor | 0.64 | 0.73 | 3.88 | 0.01 |
477- | LinearSVR | 0.62 | 0.72 | 3.96 | 0.01 |
478- | RidgeCV | 0.62 | 0.72 | 3.97 | 0.01 |
479- | BayesianRidge | 0.62 | 0.72 | 3.97 | 0.01 |
480- | Ridge | 0.62 | 0.72 | 3.97 | 0.01 |
481- | TransformedTargetRegressor | 0.62 | 0.72 | 3.97 | 0.01 |
482- | LinearRegression | 0.62 | 0.72 | 3.97 | 0.01 |
483- | ElasticNetCV | 0.62 | 0.72 | 3.98 | 0.04 |
484- | LassoCV | 0.62 | 0.72 | 3.98 | 0.06 |
485- | LassoLarsIC | 0.62 | 0.72 | 3.98 | 0.01 |
486- | LassoLarsCV | 0.62 | 0.72 | 3.98 | 0.02 |
487- | Lars | 0.61 | 0.72 | 3.99 | 0.01 |
488- | LarsCV | 0.61 | 0.71 | 4.02 | 0.04 |
489- | SGDRegressor | 0.60 | 0.70 | 4.07 | 0.01 |
490- | TweedieRegressor | 0.59 | 0.70 | 4.12 | 0.01 |
491- | GeneralizedLinearRegressor | 0.59 | 0.70 | 4.12 | 0.01 |
492- | ElasticNet | 0.58 | 0.69 | 4.16 | 0.01 |
493- | Lasso | 0.54 | 0.66 | 4.35 | 0.02 |
494- | RANSACRegressor | 0.53 | 0.65 | 4.41 | 0.04 |
495- | OrthogonalMatchingPursuitCV | 0.45 | 0.59 | 4.78 | 0.02 |
496- | PassiveAggressiveRegressor | 0.37 | 0.54 | 5.09 | 0.01 |
497- | GaussianProcessRegressor | 0.23 | 0.43 | 5.65 | 0.03 |
498- | OrthogonalMatchingPursuit | 0.16 | 0.38 | 5.89 | 0.01 |
499- | ExtraTreeRegressor | 0.08 | 0.32 | 6.17 | 0.01 |
500- | DummyRegressor | -0.38 | -0.02 | 7.56 | 0.01 |
501- | LassoLars | -0.38 | -0.02 | 7.56 | 0.01 |
502- | KernelRidge | -11.50 | -8.25 | 22.74 | 0.01 |
459+ | Model | Adjusted R-Squared | R-Squared | RMSE | Time Taken |
460+ |:------------------------------|---------------------:|------------:|---------:|-------------:|
461+ | ExtraTreesRegressor | 0.378921 | 0.520076 | 54.2202 | 0.121466 |
462+ | OrthogonalMatchingPursuitCV | 0.374947 | 0.517004 | 54.3934 | 0.0111742 |
463+ | Lasso | 0.373483 | 0.515873 | 54.457 | 0.00620174 |
464+ | LassoLars | 0.373474 | 0.515866 | 54.4575 | 0.0087235 |
465+ | LarsCV | 0.3715 | 0.514341 | 54.5432 | 0.0160234 |
466+ | LassoCV | 0.370413 | 0.513501 | 54.5903 | 0.0624897 |
467+ | PassiveAggressiveRegressor | 0.366958 | 0.510831 | 54.7399 | 0.00689793 |
468+ | LassoLarsIC | 0.364984 | 0.509306 | 54.8252 | 0.0108321 |
469+ | SGDRegressor | 0.364307 | 0.508783 | 54.8544 | 0.0055306 |
470+ | RidgeCV | 0.363002 | 0.507774 | 54.9107 | 0.00728202 |
471+ | Ridge | 0.363002 | 0.507774 | 54.9107 | 0.00556874 |
472+ | BayesianRidge | 0.362296 | 0.507229 | 54.9411 | 0.0122972 |
473+ | LassoLarsCV | 0.361749 | 0.506806 | 54.9646 | 0.0175984 |
474+ | TransformedTargetRegressor | 0.361749 | 0.506806 | 54.9646 | 0.00604773 |
475+ | LinearRegression | 0.361749 | 0.506806 | 54.9646 | 0.00677514 |
476+ | Lars | 0.358828 | 0.504549 | 55.0903 | 0.00935149 |
477+ | ElasticNetCV | 0.356159 | 0.502486 | 55.2048 | 0.0478678 |
478+ | HuberRegressor | 0.355251 | 0.501785 | 55.2437 | 0.0129263 |
479+ | RandomForestRegressor | 0.349621 | 0.497434 | 55.4844 | 0.2331 |
480+ | AdaBoostRegressor | 0.340416 | 0.490322 | 55.8757 | 0.0512381 |
481+ | LGBMRegressor | 0.339239 | 0.489412 | 55.9255 | 0.0396187 |
482+ | HistGradientBoostingRegressor | 0.335632 | 0.486625 | 56.0779 | 0.0897055 |
483+ | PoissonRegressor | 0.323033 | 0.476889 | 56.6072 | 0.00953603 |
484+ | ElasticNet | 0.301755 | 0.460447 | 57.4899 | 0.00604224 |
485+ | KNeighborsRegressor | 0.299855 | 0.458979 | 57.5681 | 0.00757337 |
486+ | OrthogonalMatchingPursuit | 0.292421 | 0.453235 | 57.8729 | 0.00709486 |
487+ | BaggingRegressor | 0.291213 | 0.452301 | 57.9223 | 0.0302746 |
488+ | GradientBoostingRegressor | 0.247009 | 0.418143 | 59.7011 | 0.136803 |
489+ | TweedieRegressor | 0.244215 | 0.415984 | 59.8118 | 0.00633955 |
490+ | XGBRegressor | 0.224263 | 0.400567 | 60.5961 | 0.339694 |
491+ | GammaRegressor | 0.223895 | 0.400283 | 60.6105 | 0.0235181 |
492+ | RANSACRegressor | 0.203535 | 0.38455 | 61.4004 | 0.0653253 |
493+ | LinearSVR | 0.116707 | 0.317455 | 64.6607 | 0.0077076 |
494+ | ExtraTreeRegressor | 0.00201902 | 0.228833 | 68.7304 | 0.00626636 |
495+ | NuSVR | -0.0667043 | 0.175728 | 71.0575 | 0.0143399 |
496+ | SVR | -0.0964128 | 0.152772 | 72.0402 | 0.0114729 |
497+ | DummyRegressor | -0.297553 | -0.00265478 | 78.3701 | 0.00592971 |
498+ | DecisionTreeRegressor | -0.470263 | -0.136112 | 83.4229 | 0.00749898 |
499+ | GaussianProcessRegressor | -0.769174 | -0.367089 | 91.5109 | 0.0770502 |
500+ | MLPRegressor | -1.86772 | -1.21597 | 116.508 | 0.235267 |
501+ | KernelRidge | -5.03822 | -3.6659 | 169.061 | 0.0243919 |
503502 """
504503
505504 def __init__ (
0 commit comments