Description Usage Format Examples
A Decision Tree implemented using the ID3 algorithm.
1 |
An object of class R6ClassGenerator
of length 24.
1 2 3 4 5 6 7 | clf <- ID3$new("monks")
clf$train(monks1_train[, -c(1,8)], monks1_train[,1])
preds <- clf$predict(monks1_test[, -c(1,8)])
accuracy <- sum(preds == monks1_test[,1])/nrow(monks1_test)
data.tree::SetEdgeStyle(clf$tree, fontname = 'helvetica', label = GetEdgeLabel)
data.tree::SetNodeStyle(clf$tree, fontname = 'helvetica', label = GetNodeLabel)
plot(clf$tree)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.