|
Home Work
|
3. A regression tree is used when the labels are real numbers instead of categories. Think of a linear regression situation when we have
data points {xi} and response variables {yi} that are real numbers.
A regression tree uses the variance of the response variables instead of the Gini index. If nj is a node with data {xij} and {yij} the variance of the response variables is
where is the average of the
Tosplitthenodeintonj1 andnj2welookforthesplitthatminimizes
In the notebook “Visualizing Trees” use a DecisionTreeRegressor instead of the DecisionTreeClassifier, directly on the data1 and the target (so do not transform the target into labels).
Instead of taking max in each rectangle take the average and generate the image.
Experiment with different color schemes (cm.?)





