p_thres<- {scClassifR}R Documentation

Setter for predicting probability threshold

Description

Setter for predicting probability threshold

Usage

p_thres(classifier) <- value

Arguments

classifier

scClassifR object. The object is returned from the train_classifier function.

value

the new threshold

Value

scClassifR object with the new threshold.

Examples

data("tirosh_mel80_example")
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)
# assign a new threhold probability for prediction
p_thres(clf_b) <- 0.4

[Package scClassifR version 1.0.0 Index]