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)

Arguments

ml_se

A SummarizedExperiment object with results computed by ml_model.

feature_num

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.

Value

Return 1 interactive plots, 2 static plots, and 2 data frames.

  1. interactive_probability_plot & static_probability_plot: the distribution of predicted probabilities in two reference labels.

  2. static_confusion_matrix: A confusion matrix composed of sample number and proportion.

  3. table_probability_plot: table for plotting probability plot.

  4. table_confusion_matrix: table for plotting confusion matrix.

Examples

data("ml_se_sub")
res <- plot_ml_probability(ml_se_sub, feature_num=10)