disstree-get-rules: Tree classification rules

disstree.get.rulesR Documentation

Tree classification rules

Description

Tree classification rules.

Usage

disstree.get.rules(tree, collapse="; ")

Arguments

tree

A tree (disstree or DissTreeNode object).

collapse

Character string. Separator between categories in class of categorical values.

Details

disstree.get.rules extracts the classification rules defined by a tree grown from a dissimilarity matrix and returns them as a vector of character strings. The rules are expressed as R commands and the i-th rule, for example, can be applied using eval(parse(text=rule[i])). Rules are built through a call to disstreeleaf.

Value

Character vector with the rules as R commands and an attribute covariates providing the names of the variables involved in the rules.

Author(s)

Gilbert Ritschard)

See Also

disstree, disstreeleaf, disstree.assign


TraMineR documentation built on Jan. 9, 2024, 3:02 p.m.