pamr.indeterminate           package:pamr           R Documentation

_A _f_u_n_c_t_i_o_n _t_h_a_t _t_a_k_e_s _e_s_t_i_m_a_t_e _c_l_a_s_s _p_r_o_b_a_b_i_l_i_t_i_e_s
_a_n_d _p_r_o_d_u_c_e_s _a _c_l_a_s_s _p_r_e_d_i_c_t_i_o_n _o_r _i_n_d_e_t_e_r_m_i_n_a_t_e _p_r_e_d_i_c_t_i_o_n

_D_e_s_c_r_i_p_t_i_o_n:

     A function that takes estimate class probabilities and produces a
     class prediction or indeterminate prediction

_U_s_a_g_e:

     pamr.indeterminate(prob, mingap=0) 

_A_r_g_u_m_e_n_t_s:

    prob: Estimated class probabilities, from pamr.predict with
          type="posterior")

  mingap: Minimum difference between highest and second highest
          probability. If difference is < mingap, prediction is set to 
          indeterminate (NA)

_D_e_t_a_i_l_s:

_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:

_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)
     prob<- pamr.predict(mytrain, mydata$x , threshold=1, type="posterior")
     pamr.indeterminate(prob,mingap=.75)

