0065b788 |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/class.R
\name{p_thres}
\alias{p_thres}
|
a599c916 |
\alias{p_thres<-,scAnnotatR-method}
|
0065b788 |
\title{p_thres}
\usage{
p_thres(classifier)
|
a599c916 |
\S4method{p_thres}{scAnnotatR}(classifier) <- value
|
0065b788 |
}
\arguments{
|
a599c916 |
\item{classifier}{scAnnotatR object.
The object is returned from the train_classifier function.}
\item{value}{the new threshold}
|
0065b788 |
}
\value{
Predicting probability threshold of object
|
a599c916 |
scAnnotatR object with the new threshold.
|
0065b788 |
}
\description{
Returns the probability threshold for the given classifier.
}
\examples{
data("tirosh_mel80_example")
|
7e9ee09d |
selected_marker_genes_B = c("CD19", "MS4A1", "CD79A")
|
0065b788 |
set.seed(123)
|
a212ecf0 |
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')
|
adb6f19c |
p_thres(classifier_b)
|
0065b788 |
|
a599c916 |
data("tirosh_mel80_example")
|
7e9ee09d |
selected_marker_genes_B = c("CD19", "MS4A1", "CD79A")
|
a599c916 |
set.seed(123)
|
a212ecf0 |
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')
|
a599c916 |
# assign a new threhold probability for prediction
|
adb6f19c |
p_thres(classifier_b) <- 0.4
|
0065b788 |
}
|