qpPRscoreThreshold          package:qpgraph          R Documentation

_C_a_l_c_u_l_a_t_i_o_n _o_f _s_c_o_r_e_s _t_h_r_e_s_h_o_l_d_s _a_t_t_a_i_n_i_n_g _n_o_m_i_n_a_l _p_r_e_c_i_s_i_o_n _o_r _r_e_c_a_l_l _l_e_v_e_l_s

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

     Calculates the score threshold at a given precision or recall
     level from a given precision-recall curve.

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

     qpPRscoreThreshold(preRecFun, level, recall.level=TRUE, max.score=9999999)

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

preRecFun: precision-recall function (output from 'qpPrecisionRecall').

   level: recall or precision level.

recall.level: logical; if TRUE then it is assumed that the value given
          in the level parameter corresponds to a desired level of
          recall; if FALSE then it is assumed a desired level of
          precision.

max.score: maximum score given by the method that produced the
          precision-recall function to an association.

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

     The score threshold at which a given level of precision or recall
     is attained by the given precision-recall function. For levels
     that do not form part of the given function their score is
     calculated by linear interpolation and for this reason is
     important to carefully specify a proper value for the 'max.score'
     parameter.

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

     R. Castelo and A. Roverato

_R_e_f_e_r_e_n_c_e_s:

     Fawcett, T. An introduction to ROC analysis. _Pattern Recogn.
     Lett._, 27:861-874, 2006.

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

     'qpPrecisionRecall' 'qpGraph'

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

     nVar <- 50 # number of variables
     maxCon <- 5  # maximum connectivity per variable
     nObs <- 30 # number of observations to simulate

     I <- qpRndGraph(n.vtx=nVar, n.bd=maxCon)
     K <- qpI2K(I)

     X <- qpSampleMvnorm(K, nObs)

     nrr.estimates <- qpNrr(X, q=1, verbose=FALSE)

     nrr.prerec <- qpPrecisionRecall(nrr.estimates, K!=0, decreasing=FALSE, recallSteps=seq(0,1,0.1))

     qpPRscoreThreshold(nrr.prerec, level=0.5, recall.level=TRUE, max.score=0)

     qpPRscoreThreshold(nrr.prerec, level=0.5, recall.level=FALSE, max.score=0)

