Hi Camille,

Probably by adding these lines:

fpf <- unlist(performance(pred,"fpr")@y.values)
fnf <- unlist(performance(pred,"fnr")@y.values)

pLhood <- tpf/fpf   # Positive Likelihood Ratio
nLhood <- fnf/tnf   # Negative Likelihood Ratio

par(mfrow=c(1,2))
plot(x, pLhood, t='l', xlab='Value', ylab='Positive Likelihood Ratio')
plot(x, nLhood, t='l', xlab='Value', ylab='Negative Likelihood Ratio')


Regards,
Pascal


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to