
Predict Tumor Grade
int_predict_grade.RdApply SwitchBox Classifier to Gene Expression Data
Usage
int_predict_grade(
data,
classifier,
grade_threshold = 0.5,
grade_labels = NULL,
verbose = TRUE
)Arguments
- data
Gene expression matrix (genes × samples). Row names must be gene identifiers.
- classifier
SwitchBox classifier object with $TSPs, $score components
- grade_threshold
Numeric cutoff for binary classification (default 0.5)
- grade_labels
Character vector of length 2: c("low_label", "high_label")
- verbose
Print diagnostic information
Value
Data frame with sample IDs as row names and two columns:
- prediction_score
Numeric scores (0-1 scale)
- predicted_class
Character classification based on threshold
Details
Internal function called by int_calc_signatures().
Not meant for out of package use. This function applies a pre-trained SwitchBox classifier to
gene expression data to predict molecular tumor grades. The classifier uses Top Scoring Pairs
(TSPs) methodology, comparing expression levels between gene pairs to generate predictions.
Each rule evaluates whether gene1 > gene2, and satisfied rules contribute their
weights to the final score.