Question: marks] a. Write code to train an AdaBoostRegressor for the scikit-learn's Boston house prices dataset. Use the default (hyper)parameters of the AdaBoostRegressor, apply cross-validation, find
![marks] a. Write code to train an AdaBoostRegressor for the scikit-learn's](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66e2bf3730206_11866e2bf36a8807.jpg)
marks] a. Write code to train an AdaBoostRegressor for the scikit-learn's Boston house prices dataset. Use the default (hyper)parameters of the AdaBoostRegressor, apply cross-validation, find and display the test score of the model. [5] b. Repeat part a using SVR (C=100) as the base estimator of the AdaBoostRegressor. Do not scale the features for the SVR. c. Repeat part b using a pipeline and scaling the features for the SVR base estimator. Compare the performances in part b and this part, and explain the difference. d. Write code to display the hyperparameters of the AdaBoostRegressor model. [2] e. Write code to perform a randomized search to find the potentially best hyperparameters of applying the AdaBoostRegressor model to the Boston house prices dataset. Search in 30 random samples of parameter settings. Use the search parameter settings below, and output the best model instance, score, and parameter values. [10] - base_estimator: None, a pipeline of feature scaling and the SVR - learning_rate: np.arange (0.1,2,0.1) - n_estimators: range (10,101,10) Remarks (optional): 1. The Boston house prices dataset is deprecated in scikit-learn 1.0 and 1.1, and a warning message is displayed when the dataset is loaded. If you want to silent the warning message, use this code: import warnings from sklearn.datasets import load_boston with warnings.catch_warnings(): warnings.simplefilter("ignore") boston = load_boston() 2. To speed up a randomized search by using all processors, specify the parameter n_jobs =1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
