report,Classifier-method {Allspice}R Documentation

Visualization of results

Description

Creates a visual report of the classification results.

Usage

report(obj, name, file = NULL)

Arguments

obj

An object of the class Classifier.

name

Name of the sample to be shown.

file

Name of the output file.

Details

The function generates a Scalable Vector Graphics figure that shows the results from each classification asset within the Classifier. The report will highlight the predicted category label and quality metrics for the primary asset and bar charts for the fits to categories in all assests.

If no file name is provided, the report is plotted on the current device, however, note that best visual outcomes are achieved by plotting in a file, especially with classifiers with three or more assets.

Value

Returns the name of the output file.

Examples

# Simulated data.
simu <- bcellALL(5)
keys <- colnames(simu$counts)

# Predict subtypes.
cls <- classifier(verbose = FALSE)
covariates(cls) <- simu$metadata
profiles(cls) <- simu$counts

# Show visual report by name.
dev.new()
report(cls, name = keys[3])

# Show visual report by sample index.
dev.new()
report(cls, name = 3)

[Package Allspice version 1.0.7 Index]