ID3: ID3

Description Usage Format Examples

Description

A Decision Tree implemented using the ID3 algorithm.

Usage

1

Format

An object of class R6ClassGenerator of length 24.

Examples

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)

msats5/capstoneProject documentation built on May 18, 2019, 12:27 p.m.