Find the tree classification rule that applies to provided cases.
disstree.assign(rules, profile, covar=attr(rules,"covariates"))
A vector of length equal to the number of rows of profile
with for each case the index of the rule that applies.
Character vector. List of classification rules such as those returned by disstree.get.rules
.
Data frame. Profiles of cases to be classified with the rules.
Character vector. List of names of covariates used by the rules.
Gilbert Ritschard)
rules
must be given as strings of R commands. Use disstree.get.rules
to get the classification rules of a tree of class disstree
.
Rules are expected to create a full partition of the space of possible values of the covariates, i.e., any profile must satisfy one and only one of the rules.
disstree
, disstreeleaf
, disstree.get.rules