View source: R/get_predictions.R
| get_predictions | R Documentation |
Build a tidy prediction table
get_predictions(object, newx, newy, use_cutoff = TRUE)
object |
An |
newx |
Feature matrix. |
newy |
True labels. |
use_cutoff |
Logical; if |
A tibble with truth labels, probabilities and predicted classes; Class1 is the positive label 1, classified by probability strictly greater than the cutoff.
Zhou et al. (2022). doi:10.1371/journal.pcbi.1009956
predict.xplus(), assess()
set.seed(1)
x <- matrix(rnorm(100 * 5), ncol = 5)
y <- c(rep(1, 20), rep(0, 80))
fit <- xplus(x, y, max_iter = 5)
get_predictions(fit, x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.