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

C5.0 Rules 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="class")
sum(ds[te, target] != predicted)/length(predicted) # Overall error rate

## Warning: Incompatible methods ("Ops.data.frame", "Ops.factor") for "!="

## Error in ds[te, target] != predicted: comparison of these types is not implemented

round(100*table(ds[te, target], predicted, dnn=c("Actual", "Predicted"))/length(predicted))

## Warning in Ops.factor(xi, xj): '>' not meaningful for factors

## Error in if (xi > xj) 1L else -1L: missing value where TRUE/FALSE needed


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.