Skip to content
Prev 332915 / 398503 Next

C50 Node Assignment

There is a sub-object called 'rules' that has the output of C5.0 for this model:
id="See5/C5.0 2.07 GPL Edition 2013-11-09"
entries="1"
rules="4" default="setosa"
conds="1" cover="50" ok="50" lift="2.94231" class="setosa"
type="2" att="Petal.Length" cut="1.9" result="<"
conds="3" cover="48" ok="47" lift="2.88" class="versicolor"
type="2" att="Petal.Length" cut="1.9" result=">"
type="2" att="Petal.Length" cut="4.9000001" result="<"
type="2" att="Petal.Width" cut="1.7" result="<"
conds="1" cover="46" ok="45" lift="2.875" class="virginica"
type="2" att="Petal.Width" cut="1.7" result=">"
conds="1" cover="46" ok="44" lift="2.8125" class="virginica"
type="2" att="Petal.Length" cut="4.9000001" result=">"

You would either have to parse this or parse the summary results:
Call:
C5.0.formula(formula = Species ~ ., data = iris, rules = TRUE)

<snip>
Rules:

Rule 1: (50, lift 2.9)
Petal.Length <= 1.9
->  class setosa  [0.981]

Rule 2: (48/1, lift 2.9)
Petal.Length > 1.9
Petal.Length <= 4.9
Petal.Width <= 1.7
->  class versicolor  [0.960]
<snip>

Max
On Sat, Nov 9, 2013 at 1:11 PM, Carl Witthoft <carl at witthoft.com> wrote: