View source: R/PPtree_splitMOD.R
PPtree_splitMOD | R Documentation |
Find tree structure using various projection pursuit indices of classification in each split.
PPtree_splitMOD(form, data, PPmethod='LDA',
size.p=1, lambda=0.1, entro ,entroindiv,...)
form |
A character with the name of the class variable. |
data |
Data frame with the complete data set. |
PPmethod |
index to use for projection pursuit: 'LDA', 'PDA' |
size.p |
proportion of variables randomly sampled in each split, default is 1, returns a PPtree. |
lambda |
penalty parameter in PDA index and is between 0 to 1 . If |
entro |
TRUE, compute the entropy method |
entroindiv |
TRUE, compute the entropy for each obs...clarify this |
... |
arguments to be passed to methods |
An object of class PPtreeclass
with components
Tree.Struct |
Tree structure of projection pursuit classification tree |
projbest.node |
1-dim optimal projections of each split node |
splitCutoff.node |
cutoff values of each split node |
origclass |
original class |
origdata |
original data |
Lee, YD, Cook, D., Park JW, and Lee, EK (2013) PPtree: Projection pursuit classification tree, Electronic Journal of Statistics, 7:1369-1386.
#crab data set
## Not run:
train<- sample(1:200,150)
Tree.crab <- PPtree_splitMOD("Type~.", data = PPforest::crab[train, ],
PPmethod = "LDA", size.p = 1, entro = TRUE,entroindiv=FALSE)
Tree.crab
Tree.result <- PPtreeViz::PPTreeclass(Type~.,data = PPforest::crab[train,],"LDA")
Tree.result
PPtreeViz::PPclassify(Tree.result,PPforest::crab[-train,-1],1,crab[-train,1])
Tree.iris <- PPtree_splitMOD("Species~.", data = iris, PPmethod = "PDA",
size.p = 1, entro = TURE, entroindiv = FALSE)
Tree.iris
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.