Learn R Programming

PPtreeExt (version 0.1.0)

TreeExt.construct: Projection pursuit classification tree extensions

Description

Construct the projection pursuit classification tree extensions

Usage

TreeExt.construct(origclass, origdata, Tree.Struct, id, rep, rep1, rep2,
projbest.node, splitCutoff.node, PPmethod, 
lambda = NULL, q = 1, weight = TRUE, srule=TRUE, tot=NULL, tol = .5,...)

Value

A list containing the complete tree structure and node information:

Tree.Struct

A matrix where each row represents a node in the projection pursuit classification tree. The matrix has 5 columns:

  • Column 1: Node ID

  • Column 2: ID of the left child node (or 0 if terminal node)

  • Column 3: ID of the right child node, or the predicted class label if terminal node

  • Column 4: Projection index (which projection vector is used at this node)

  • Column 5: Optimization criterion value for the projection at this node

projbest.node

A matrix where each row contains the optimal projection coefficients (Alpha vector) for each split node.

splitCutoff.node

A matrix/vector containing the optimal cutpoint values used at each split node.

rep

Integer counter tracking the current node being processed (internal use).

rep1

Integer counter for assigning child node IDs (internal use).

rep2

Integer counter for tracking projection indices (internal use).

Arguments

origclass

factor or numeric vector containing the class labels for each observation.

origdata

data frame with the original data without class variable

Tree.Struct

tree structure of projection pursuit classification tree

id

tree node id

rep

internal counter for nodes

rep1

internal counter for nodes

rep2

internal counter for nodes

projbest.node

bests projection node

splitCutoff.node

cutof node

PPmethod

method for projection pursuit; "LDA", "PDA"

lambda

lambda in PDA index

q

numeric value with dimension of the projected data, if it is 1 then 1D projection is used

weight

weight flag in LDA, PDA

srule

stopping rule flag; if TRUE use stopping rule, if FALSE stop only for pure or empty nodes

tot

total number of observations

tol

tolerance value for entropy stopping rule for splitting a node

...

additional arguments to pass trough

Details

Find tree structure using various projection pursuit indices of classification in each split.

This function recursively constructs a binary classification tree using projection pursuit. At each node, it finds the optimal projection direction that best separates classes, determines a cutpoint, and creates child nodes until stopping criteria are met (pure nodes, small node size, or low entropy).