Commit 954cc61b authored by Philippe Veber's avatar Philippe Veber
Browse files

scripts/recall_precision_curve: fixed curve display

parent afb4f400
......@@ -30,7 +30,8 @@ main <- function(fn, dest) {
recall <- r$TP / (r$TP + r$FN)
precision <- r$TP / (r$TP + r$FP)
precision[is.nan(precision)] <- 1
data.frame(recall = recall, precision = precision, method = rep(l, length(recall)))
n <- length(recall)
data.frame(recall = recall[n:1], precision = precision[n:1], method = rep(l, n))
})
dd <- do.call("rbind", rp_by_meth)
plot <-
......@@ -40,7 +41,7 @@ main <- function(fn, dest) {
theme(legend.position="top") +
ylim(c(0,1)) + xlim(c(0,1)) +
guides(fill=FALSE) + guides(col=FALSE) + #geom_point(size=1, alpha=alpha)
geom_step(direction="vh", size=1, alpha=alpha) +
geom_line(alpha=alpha) +
geom_hline( aes(yintercept = 0.9), col="black" , size = 0.5, show.legend = NA,linetype="dashed") +
theme(axis.text.x = element_text(angle = 45, hjust = 1)) +
theme(strip.text.y = element_text(size=7))
......@@ -60,6 +61,7 @@ main <- function(fn, dest) {
svg(dest)
print(plot_recall_precision)
dev.off()
## saveRDS(list(dd, d), "/home/pveber/rien.rds")
}
main(args[1], args[2])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment