1 This example uses a twenty year old data set that you can use to predict someone’s income from demographic data.
2 from sklearn import tree clf = tree. DecisionTreeRegressor ( ) clf = clf. fit ( trn , trn_v )
3 For a large data set it is likely valuable to stream the results of queries into the model, but this dataset is small, so I haven’t attempted that.