scaspa                 package:delt                 R Documentation

_F_i_n_d_s _t_h_e _n_u_m_b_e_r _o_f _m_o_d_e_s _o_f _h_i_s_t_o_g_r_a_m_s _w_h_i_c_h
_a_r_e _o_b_t_a_i_n_e_d _b_y _p_r_u_n_i_n_g _a_n _o_v_e_r_f_i_t_t_i_n_g _h_i_s_t_o_g_r_a_m

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

     scaspa(treeseq, bind, eind)

_A_r_g_u_m_e_n_t_s:

 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.

    eind: integer in 1:subnum, where subnum is the number of elements
          in field "leafs" of "treeseq". We need bind<eind. 

_V_a_l_u_e:

     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

_A_u_t_h_o_r(_s):

     Jussi Klemel

_S_e_e _A_l_s_o:

     'densplit', 'prune'

_E_x_a_m_p_l_e_s:

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

     scaspa(treeseq,1,5)

