classification_tree: Build a classification tree

Description Usage Arguments Value See Also

View source: R/script.R View source: R/script_BACKUP_1282.R View source: R/script_BACKUP_1990.R View source: R/script_BACKUP_2903.R View source: R/script_BACKUP_3193.R View source: R/script_BASE_1282.R View source: R/script_BASE_1990.R View source: R/script_BASE_2903.R View source: R/script_BASE_3193.R View source: R/script_LOCAL_1282.R View source: R/script_LOCAL_1990.R View source: R/script_LOCAL_2903.R View source: R/script_LOCAL_3193.R View source: R/script_REMOTE_1282.R View source: R/script_REMOTE_1990.R View source: R/script_REMOTE_2903.R View source: R/script_REMOTE_3193.R

Description

classification_tree builds a classification tree using Information Gain as the splitting criterion

Usage

1
classification_tree(df, target, nxt = "seq", stopc = 1000)

Arguments

df

the data frame containing the dataset

target

the target variable, specified either using a character string or the column index in df

nxt

the method of growing the tree, which should have one of the following two values: "seq" (sequentially, level by level) and "ig" (by highest IG, node by node)

stopc

the value at which three building should stop, representing the number of levels when nxt="seq" and the number of nodes when nxt="ig"

Value

A dataframe containing a row for each tree node, with the following columns:

Parent: row index of parent node

Value: the value of the parent's splitting attribute that defines this node

Attrib: the splitting attribute for this node

Level: the level of the node (starts with 1 for the root node, has value 2 for the root nodes' child nodes etc.)

IG: the Information Gain achieved by the splitting attribute at this node

Split: a logical value indicating whether the node has been split or not (some nodes may have a splitting attribute assigned but have IG=0, resulting in them not being split)

P_<cls>: proportion of the target class in the subset represented by the node, one for each of the target classes

See Also

plot_class_tree


teofanan/classprobtree documentation built on May 17, 2019, 5:53 p.m.