Get Writing Help
WhatsApp
    Skip to content
Start Your Order
Uncategorized

Python task

admin 1 min read

 

 

Decision Trees

A. Load the Boston house prices dataset with the load_boston method from the module

sklearn.datasets. What is the target variable and what are the features?

B. Import the class DecisionTreeRegressor from the module sklearn.tree. Using 5
fold cross validation, plot the training error and test error as you vary the parameter
max_depth from 1 to 8 in predicting the target variable from the features. Use mean squared error as the evaluation metric.
C. What is the optimal max_depth?

The post Python task first appeared on COMPLIANT PAPERS.

admin Academic Writer & Editor
Limited Offer     Get 25% off your first order — use code STUDYLINK25 at checkout    Claim Now