plotScoreBarcode: Plot a barcode representation of model scores

View source: R/global.visu.R

plotScoreBarcodeR Documentation

Plot a barcode representation of model scores

Description

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.

Usage

plotScoreBarcode(dscore, y, nb.col.levels = 30, main = "")

Arguments

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.

Details

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.

Value

This function generates a barcode-style heatmap plot.

Author(s)

Edi Prifti (IRD)

Examples

## 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)


predomics/predomicspkg documentation built on Dec. 11, 2024, 11:06 a.m.