Learn R Programming

PPtreeExt (version 0.1.0)

print.PPtreeExtclass: Print Method for PPtreeExtclass Objects

Description

Prints a summary of a fitted projection pursuit classification tree, including the tree structure, optionally the projection coefficients and cutoff values, and the training error rate.

Usage

# S3 method for PPtreeExtclass
print(x, coef.print = FALSE, cutoff.print = FALSE, verbose = TRUE, ...)

Value

The object x, invisibly

Arguments

x

An object of class "PPtreeExtclass" from PPtreeExtclass or PPtreeExt_split.

coef.print

Logical indicating whether to print the projection coefficients for each split node. Default is FALSE.

cutoff.print

Logical indicating whether to print the cutoff values for each split node. Default is FALSE.

verbose

Logical indicating whether to print the tree structure and error rate. If FALSE, the function returns the tree structure invisibly without printing. Default is TRUE.

...

Additional arguments (currently not used).

Details

The function traverses the tree structure stored in x$Tree.Struct and creates a hierarchical text representation. When coef.print = TRUE, the projection coefficients (linear combinations of features) used at each split are displayed. When cutoff.print = TRUE, the threshold values used to determine left/right splits are shown.

The training error rate is computed by applying the fitted tree to the original training data.

See Also

PPtreeExtclass, PPtreeExt_split, predict.PPtreeExtclass