Go to TogaWare.com Home Page. Data Science Desktop Survival Guide
by Graham Williams
Duck Duck Go



CLICK HERE TO VISIT THE UPDATED SURVIVAL GUIDE

Conditional Decision Tree Performance

Here we plot the performance of the decision tree, showing a risk chart. The areas under the recall and risk curves are also reported.

predicted <- predict(model, ds[te, vars], type="prob")[,2]
riskchart(predicted, actual, risks)

## Error in na.omit(ac): object 'actual' not found

An error matrix shows, clockwise from the top left, the percentages of true negatives, false positives, true positives, and false negatives.

predicted <- predict(model, ds[te, vars], type="response")
sum(actual != predicted)/length(predicted) # Overall error rate

## Error in eval(expr, envir, enclos): object 'actual' not found

round(100*table(actual, predicted, dnn=c("Actual", "Predicted"))/length(predicted))

## Error in table(actual, predicted, dnn = c("Actual", "Predicted")): object 'actual' not found


Support further development by purchasing the PDF version of the book.
Other online resources include the GNU/Linux Desktop Survival Guide.
Books available on Amazon include Data Mining with Rattle and Essentials of Data Science.
Popular open source software includes rattle and wajig.
Hosted by Togaware, a pioneer of free and open source software since 1984.
Copyright © 2000-2020 Togaware Pty Ltd. . Creative Commons ShareAlike V4.