https://github.com/cran/precrec
Tip revision: 9c56b91df45d18e10abd76aa1359b1482955fbbc authored by Takaya Saito on 04 December 2015, 15:40:36 UTC
version 0.1.1
version 0.1.1
Tip revision: 9c56b91
g_plot.R
#' @rdname plot
#' @export
plot.sscurves <- function(x, y = NULL, ...) {
arglist <- .get_plot_arglist(y, def_curvetype = c("ROC", "PRC"),
def_type = "l", def_show_cb = FALSE,
def_raw_curves = TRUE, def_add_np_nn = TRUE,
def_show_legend = FALSE, ...)
arglist[["raw_curves"]] <- TRUE
arglist[["show_cb"]] <- FALSE
arglist[["curvetype"]] <- .pmatch_curvetype_rocprc(arglist[["curvetype"]])
.plot_multi(x, arglist)
}
#' @rdname plot
#' @export
plot.mscurves <- function(x, y = NULL, ...) {
arglist <- .get_plot_arglist(y, def_curvetype = c("ROC", "PRC"),
def_type = "l", def_show_cb = FALSE,
def_raw_curves = TRUE, def_add_np_nn = TRUE,
def_show_legend = TRUE, ...)
arglist[["raw_curves"]] <- TRUE
arglist[["show_cb"]] <- FALSE
arglist[["curvetype"]] <- .pmatch_curvetype_rocprc(arglist[["curvetype"]])
.plot_multi(x, arglist)
}
#' @rdname plot
#' @export
plot.smcurves <- function(x, y = NULL, ...) {
arglist <- .get_plot_arglist(y, def_curvetype = c("ROC", "PRC"),
def_type = "l", def_show_cb = TRUE,
def_raw_curves = FALSE, def_add_np_nn = TRUE,
def_show_legend = FALSE, ...)
arglist[["curvetype"]] <- .pmatch_curvetype_rocprc(arglist[["curvetype"]])
.plot_multi(x, arglist)
}
#' @rdname plot
#' @export
plot.mmcurves <- function(x, y = NULL, ...) {
arglist <- .get_plot_arglist(y, def_curvetype = c("ROC", "PRC"),
def_type = "l", def_show_cb = FALSE,
def_raw_curves = FALSE, def_add_np_nn = TRUE,
def_show_legend = TRUE, ...)
arglist[["curvetype"]] <- .pmatch_curvetype_rocprc(arglist[["curvetype"]])
.plot_multi(x, arglist)
}
#' @rdname plot
#' @export
plot.sspoints <- function(x, y = NULL, ...) {
mnames <- c("error", "accuracy", "specificity", "sensitivity", "precision")
arglist <- .get_plot_arglist(y, def_curvetype = mnames, def_type = "p",
def_show_cb = FALSE, def_raw_curves = TRUE,
def_add_np_nn = TRUE, def_show_legend = FALSE,
...)
arglist[["raw_curves"]] <- TRUE
arglist[["show_cb"]] <- FALSE
arglist[["curvetype"]] <- .pmatch_curvetype_basic(arglist[["curvetype"]])
.plot_multi(x, arglist)
}
#' @rdname plot
#' @export
plot.mspoints <- function(x, y = NULL, ...) {
mnames <- c("error", "accuracy", "specificity", "sensitivity", "precision")
arglist <- .get_plot_arglist(y, def_curvetype = mnames, def_type = "p",
def_show_cb = FALSE, def_raw_curves = TRUE,
def_add_np_nn = TRUE, def_show_legend = TRUE,
...)
arglist[["raw_curves"]] <- TRUE
arglist[["show_cb"]] <- FALSE
arglist[["curvetype"]] <- .pmatch_curvetype_basic(arglist[["curvetype"]])
.plot_multi(x, arglist)
}
#' @rdname plot
#' @export
plot.smpoints <- function(x, y = NULL, ...) {
mnames <- c("error", "accuracy", "specificity", "sensitivity", "precision")
arglist <- .get_plot_arglist(y, def_curvetype = mnames, def_type = "p",
def_show_cb = TRUE, def_raw_curves = FALSE,
def_add_np_nn = TRUE, def_show_legend = FALSE,
...)
arglist[["curvetype"]] <- .pmatch_curvetype_basic(arglist[["curvetype"]])
.plot_multi(x, arglist)
}
#' @rdname plot
#' @export
plot.mmpoints <- function(x, y = NULL, ...) {
mnames <- c("error", "accuracy", "specificity", "sensitivity", "precision")
arglist <- .get_plot_arglist(y, def_curvetype = mnames, def_type = "p",
def_show_cb = FALSE, def_raw_curves = FALSE,
def_add_np_nn = TRUE, def_show_legend = TRUE,
...)
arglist[["curvetype"]] <- .pmatch_curvetype_basic(arglist[["curvetype"]])
.plot_multi(x, arglist)
}