oblique.tree (version 1.1.1)

generate.ith.superclass: Internal Function to Identify of Ideal Outcomes

Description

Generates logical vectors that identify ideal outcomes.

Usage

generate.ith.superclass( R, superclass.index)

Arguments

R
The number of residual classes at a node.
superclass.index
Integer in $1,\ldots,2^{R-1}-1$ indicating required ideal outcome.

Value

A vector of length $R$ with 0's and 1's denoting association with the left superclass.

Details

With $R$ residual classes at a node, $2^{R-1}-1$ different ideal outcomes arise. generate.ith.superclass identifies them.

References

Truong. A (2009) Fast Growing and Interpretable Oblique Trees via Probabilistic Models

Examples

Run this code
#list all ideal outcomes when there are 5 residual classes at a node
for (i in 1:(2^{5-1}-1)){
	ideal.outcome.i <- oblique.tree:::generate.ith.superclass(
		R			= 5, 
		superclass.index	= i)
	print(ideal.outcome.i)
}

Run the code above in your browser using DataCamp Workspace