predictTree | R Documentation |
This function utilizes a trained decision tree model (ODT) to predict treatment outcomes for test data based on patient sensitivity data and features, such as mutations or gene expression profiles.
predictTree(tree, PatientData, PatientSensitivityTrain)
tree |
A trained decision tree object created by the 'trainTree' function. |
PatientData |
A matrix representing patient features, where rows correspond to patients/samples and columns correspond to genes/features. This matrix can contain:
|
PatientSensitivityTrain |
A matrix containing the drug response values of the **training dataset**. In this matrix, rows correspond to patients, and columns correspond to drugs. This matrix is used solely for extracting treatment names and is not used in the prediction process itself. |
A factor representing the assigned treatment for each node in the decision tree based on the provided patient data and sensitivity.
# Example 1: Prediction using mutation data
data("mutations_w12")
data("mutations_w34")
data("drug_response_w12")
ODTmut <- trainTree(PatientData = mutations_w12,
PatientSensitivity = drug_response_w12,
minbucket = 10)
ODTmut
ODT_mutpred <- predictTree(tree = ODTmut,
PatientSensitivityTrain = drug_response_w12,
PatientData = mutations_w34)
# Example 2: Prediction using gene expression data
data("expression_w34")
data("expression_w12")
data("drug_response_w34")
ODTExp <- trainTree(PatientData = expression_w34,
PatientSensitivity = drug_response_w34,
minbucket = 20)
ODTExp
ODT_EXPpred <- predictTree(tree = ODTExp,
PatientSensitivityTrain = drug_response_w34,
PatientData = expression_w12)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.