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.
Plagiarism Free Assignment Help
Expert Help With This Assignment — On Your Terms
✓ Native UK, USA & Australia writers
✓ Deadline from 3 hours
✓ 100% Plagiarism-Free — Turnitin included
✓ Unlimited free revisions
✓ Free to submit — compare quotes