plotScoreBarcode | R Documentation |
This function creates a barcode-style heatmap to visualize the scores of a model, ordered by class labels. It uses color gradients to represent the score values and displays the relationship between the scores and the actual classes.
plotScoreBarcode(dscore, y, nb.col.levels = 30, main = "")
dscore |
A matrix of model scores with rows representing different features (or samples) and columns representing the model's prediction scores for each sample. |
y |
A vector of class labels corresponding to the samples. |
nb.col.levels |
An integer specifying the number of color levels to represent the scores. Default is 30. |
main |
A title for the plot. Default is an empty string. |
The function visualizes the model scores by reordering them according to the class labels ('-1' and '1'). It uses a color gradient to represent the range of scores and adds a grid for better visual distinction. The plot also includes axes to indicate the feature names and the class labels.
The color palette is generated using 'viridis' for better visibility of scores across different value ranges. The breaks are set to cover the entire range of the scores.
This function generates a barcode-style heatmap plot.
Edi Prifti (IRD)
## Not run:
# Assuming `dscore` is a matrix of scores and `y` is a vector of class labels
plotScoreBarcode(dscore, y, nb.col.levels = 30, main = "Model Score Barcode")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.