This function computes and visualizes the average predicted probabilities for each sample in the testing data across all cross-validation (CV) runs. The function plots the distribution of predicted probabilities for two reference labels and a confusion matrix that includes both the sample count and proportion.
plot_ml_probability(ml_se, feature_num)
A SummarizedExperiment object with results computed by ml_model
.
Numeric. The number of features to be shown in the plots.
A feature number value selected from feature_option
of the
SummarizedExperiment object returned by ml_model
. Usually be
one of 2, 3, 5, 10, 20, 50, 100. Default is 10
.
Return 1 interactive plots, 2 static plots, and 2 data frames.
interactive_probability_plot & static_probability_plot: the distribution of predicted probabilities in two reference labels.
static_confusion_matrix: A confusion matrix composed of sample number and proportion.
table_probability_plot: table for plotting probability plot.
table_confusion_matrix: table for plotting confusion matrix.
data("ml_se_sub")
res <- plot_ml_probability(ml_se_sub, feature_num=10)