Computes precision and recall statistics separating observed from hidden variables, and (FPR,FNR) for hidden variables .

ppvtpr(probs, G, r, thresh = 0.5)

Arguments

probs

Matrix of estimated edges probabilities.

G

Original graph.

r

Number of missing actors.

thresh

Required threshold for criteria computations, default to 0.5.

Value

  • PPV: precision of the whole data.

  • PPVH: precision regarding observed data.

  • PPVO: precision regarding hidden data.

  • TPR: recall of the whole data.

  • TPRH: recall regarding observed data.

  • TPRO: recall regarding hidden data.

  • FPRH: false Positive Rate of hidden data.

  • FNRH: false Negative Rate of hidden data.

Examples

data=generate_missing_data(n=100,p=10,r=1,type="scale-free", plot=FALSE) PLNfit<-norm_PLN(data$Y) MO<-PLNfit$MO SO<-PLNfit$SO sigma_O=PLNfit$sigma_O #-- use true clique for example initClique=data$TC #-- initialize the VEM initList=initVEM(cliqueList=initClique,sigma_O, MO,r=1 ) nestorFit=nestorFit(MO,SO, initList=initList, maxIter=3,verbatim=1 )
#> #> nestor ran in 0.212secs and 3 iterations.
#-- obtain criteria ppvtpr(nestorFit$Pg,r=1, data$G)
#> $PPV #> [1] 1 #> #> $PPVH #> [1] 1 #> #> $PPVO #> [1] 1 #> #> $TPR #> [1] 1 #> #> $TPRH #> [1] 1 #> #> $TPRO #> [1] 1 #> #> $FPRH #> [1] 0 #> #> $FNRH #> [1] 0 #>