plot_roc_curve: Plot roc curve

View source: R/classifier.R

plot_roc_curveR Documentation

Plot roc curve

Description

Plot roc curve

Usage

plot_roc_curve(test_result)

Arguments

test_result

result of test_classifier function

Value

ggplot2 roc curve

Examples

# load small example dataset
data("tirosh_mel80_example")

# train a classifier, for ex: B cell
selected_marker_genes_B = c("CD19", "MS4A1", "CD79A")
set.seed(123)
classifier_b <- train_classifier(train_obj = tirosh_mel80_example,
assay = 'RNA', slot = 'counts', marker_genes = selected_marker_genes_B,
cell_type = "b cells", tag_slot = 'active.ident')

classifier_b_test <- test_classifier(classifier = classifier_b,
test_obj = tirosh_mel80_example, assay = 'RNA', slot = 'counts',
tag_slot = 'active.ident', target_cell_type = c("B cell"))

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

grisslab/scAnnotatR documentation built on March 20, 2023, 2:42 a.m.