plot.PPtreeclass: PPtree plot

Description Usage Arguments Details References Examples

View source: R/plotPPtreeclass.R

Description

projection pursuit classification tree plot

Usage

1
2
3
4
5
6
7
8
9
## S3 method for class 'PPtreeclass'
plot(
  x,
  font.size = 17,
  width.size = 1,
  main = "Projection Pursuit Classification Tree",
  sub = NULL,
  ...
)

Arguments

x

PPtreeclass object

font.size

font size of plot

width.size

size of eclipse in each node.

main

main title

sub

sub title

...

arguments to be passed to methods

Details

Draw projection pursuit classification tree with tree structure. It is modified from a function in party library.

References

Lee, EK(2017) PPtreeViz: An R Package for Visualizing Projection Pursuit Classification Trees, Journal of Statistical Software <doi:10.18637/jss.v083.i08>

Examples

1
2
3
4
data(iris)
Tree.result <- PPTreeclass(Species~., data = iris,"LDA")
Tree.result
plot(Tree.result)

Example output

Loading required package: gridExtra
Loading required package: ggplot2
Loading required package: partykit
Loading required package: grid
Loading required package: libcoin
Loading required package: mvtnorm
============================================================= 
Projection Pursuit Classification Tree result 
=============================================================

1) root
   2)* proj1*X < cut1  ->  "setosa"
   3)  proj1*X >= cut1
      4)* proj2*X < cut2  ->  "virginica"
      5)* proj2*X >= cut2  ->  "versicolor"

Error rates of various cutoff values 
-------------------------------------------------------------
           Rule1 Rule2  Rule3  Rule4 Rule5 Rule6  Rule7  Rule8
error.rate  0.02  0.02 0.0267 0.0267  0.02  0.02 0.0267 0.0267

PPtreeViz documentation built on Dec. 6, 2019, 9:07 a.m.