With Multiple Regression, the R-Squared gives the researcher an estimate of the explanatory power of the regression equation.
What is the equivalent for Decision Trees?
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It only takes a minute to sign up.Sign up to join this community
Decision tree usually "overfit" the data (in the sense that every point is assigned to a specific class) if you don't provide them early stopping criterion when you grow the tree. However, you can use out-of-bags estimate to get a pseudo R squared.
Per example, for a regression random forest, R offers an implementation of the pseudo R squared.
Value An object of class randomForest, which is a list with the following components: [...] rsq (regression only) “pseudo R-squared”: 1 - mse / Var(y)
The measure of model accuracy I see most is the "confusion matrix". It's a table that shows which observations were fitted correctly and which were misclassified. Here's an example with R code. From a table of Actual vs. Predicted, you could calculate many measures like
In general, however, R-sq can be calculated for most models - you can square the correlation of the observed values with the fitted values from a (tree) model. I haven't seen R-sq used with decision trees, but I've calculated it in the past for superiors who really like seeing R-sq values for any and all modeling analyses.