pamr.adaptthresh            package:pamr            R Documentation

_A _f_u_n_c_t_i_o_n  _t_o _a_d_a_p_t_i_v_e _c_h_o_o_s_e _t_h_r_e_s_h_o_l_d _s_c_a_l_e_s, _f_o_r
_u_s_e _i_n _p_a_m_r._t_r_a_i_n

_D_e_s_c_r_i_p_t_i_o_n:

     A function  to adaptive choose threshold scales, for use in
     pamr.train

_U_s_a_g_e:

     pamr.adaptthresh(object, ntries = 10, reduction.factor = 0.9, full.out = FALSE)

_A_r_g_u_m_e_n_t_s:

  object: The result of a call to pamr.train 

  ntries: Number of iterations to use in algorithm

reduction.factor: Amount by which a scaling is reduced in one step of
          the algorithm

full.out: Provide more detailed  output

_D_e_t_a_i_l_s:

     'pamr.adaptthresh' Adaptively searches for  set of good threshold
     scales.  The baseline (default) scale is 1 for each class. The
     idea is that for easy to classify classes, the threshold scale can
     be increased without increasing the error rate for that class, and
     resulting in fewer genes needed for the classification rule. The
     scalings from pamr.adaptthresh are then used in pamr.train, and
     pamr.cv. The results may be better than those obtained with the
     default values of threshold.scale.

_A_u_t_h_o_r(_s):

     Trevor Hastie, Robert Tibshirani, Balasubramanian Narasimhan, and
     Gilbert Chu

_R_e_f_e_r_e_n_c_e_s:

     Robert Tibshirani, Trevor Hastie, Balasubramanian Narasimhan, and
     Gilbert Chu. "Diagnosis of multiple cancer types by shrunken
     centroids of gene expression"  PNAS 2002 99:6567-6572 (May 14). 

     Robert Tibshirani,  Trevor Hastie, Balasubramanian Narasimhan, and
     Gilbert Chu (2002). Class prediction by   nearest shrunken
     centroids,with applications to DNA microarrays. Stanford tech
     report.

_E_x_a_m_p_l_e_s:

     set.seed(120)
     x <- matrix(rnorm(1000*20),ncol=20)
     y <- sample(c(1:4),size=20,replace=TRUE)
     mydata <- list(x=x,y=y)
     mytrain <-   pamr.train(mydata)
     new.scales <- pamr.adaptthresh(mytrain)

      
     mytrain2 <- pamr.train(mydata, threshold.scale=new.scales)

     myresults2 <- pamr.cv(mytrain2, mydata)

