disstree-assign: Assign rules to profiles provided

disstree.assignR Documentation

Assign rules to profiles provided

Description

Find the tree classification rule that applies to provided cases.

Usage

disstree.assign(rules, profile, covar=attr(rules,"covariates"))

Arguments

rules

Character vector. List of classification rules such as those returned by disstree.get.rules.

profile

Data frame. Profiles of cases to be classified with the rules.

covar

Character vector. List of names of covariates used by the rules.

Details

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.

Value

A vector of length equal to the number of rows of profile with for each case the index of the rule that applies.

Author(s)

Gilbert Ritschard)

See Also

disstree, disstreeleaf, disstree.get.rules


TraMineR documentation built on Sept. 19, 2023, 1:07 a.m.