Learn R Programming

delt (version 0.8.2)

scaspa: Finds the number of modes of histograms which are obtained by pruning an overfitting histogram

Description

Function "densplit" returns an overfitting histogram as an evaluation tree. Function "prune" finds the candidate nodes for pruning. Function "scaspa" finds the number of modes (local maxima) in the histograms which are obtained by using these candidate nodes for pruning.

Usage

scaspa(treeseq, bind, eind)

Arguments

treeseq
a list returned by function "prune"
bind
integer in 1:subnum, where subnum is the number of elements in field "leafs" of "treeseq". We need bind
eind
integer in 1:subnum, where subnum is the number of elements in field "leafs" of "treeseq". We need bind

Value

List with the following vectors whose length is (eind-bind+1)
moodilkm
number of local maxima for each subtree
alfas
value of the smoothing parameter alpha for each subtree
leafnums
number of leaves for each subtree

See Also

densplit, prune

Examples

Run this code
set.seed(1)
dendat<-matrix(rnorm(20),10)  
minlkm<-2
et<-densplit(dendat,minlkm)
treeseq<-prune(et)
treeseq$leafs

scaspa(treeseq,1,5)

Run the code above in your browser using DataLab