plot_roc_curve: Plot roc curve

Description Usage Arguments Value Examples

View source: R/classifier.R

Description

Plot roc curve

Usage

1
plot_roc_curve(test_result)

Arguments

test_result

result of test_classifier function

Value

ggplot2 roc curve

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# load small example dataset
data("tirosh_mel80_example")

# train a classifier, for ex: B cell
selected_features_B = c("CD19", "MS4A1", "CD79A")
set.seed(123)
clf_b <- train_classifier(train_obj = tirosh_mel80_example, 
features = selected_features_B, cell_type = "B cells")

clf_b_test <- test_classifier(test_obj = tirosh_mel80_example, 
classifier = clf_b)

# run plot curve on the test result
roc_curve <- plot_roc_curve(test_result = clf_b_test)

grisslab/scClassifR documentation built on Oct. 27, 2021, 12:13 p.m.