Docstring:
Usage: qiime sample-classifier confusion-matrix [OPTIONS]
Make a confusion matrix and calculate accuracy of predicted vs. true values
for a set of samples classified using a sample classifier. If per-sample
class probabilities are provided, will also generate Receiver Operating
Characteristic curves and calculate area under the curve for each class.
Inputs:
--i-predictions ARTIFACT SampleData[ClassifierPredictions]
Predicted values to plot on x axis. Should be
predictions of categorical data produced by a sample
classifier. [required]
--i-probabilities ARTIFACT SampleData[Probabilities]
Predicted class probabilities for each input sample.
[optional]
Parameters:
--m-truth-file METADATA
--m-truth-column COLUMN MetadataColumn[Categorical]
Metadata column (true values) to plot on y axis.
[required]
--p-missing-samples TEXT Choices('error', 'ignore')
How to handle missing samples in metadata. "error"
will fail if missing samples are detected. "ignore"
will cause the feature table and metadata to be
filtered, so that only samples found in both files
are retained. [default: 'error']
--p-vmin VALUE Float | Str % Choices('auto')
The minimum value to use for anchoring the colormap.
If "auto", vmin is set to the minimum value in the
data. [default: 'auto']
--p-vmax VALUE Float | Str % Choices('auto')
The maximum value to use for anchoring the colormap.
If "auto", vmax is set to the maximum value in the
data. [default: 'auto']
--p-palette TEXT Choices('YellowOrangeBrown', 'YellowOrangeRed',
'OrangeRed', 'PurpleRed', 'RedPurple', 'BluePurple', 'GreenBlue',
'PurpleBlue', 'YellowGreen', 'summer', 'copper', 'viridis', 'cividis',
'plasma', 'inferno', 'magma', 'sirocco', 'drifting', 'melancholy',
'enigma', 'eros', 'spectre', 'ambition', 'mysteriousstains', 'daydream',
'solano', 'navarro', 'dandelions', 'deepblue', 'verve', 'greyscale')
The color palette to use for plotting.
[default: 'sirocco']
Outputs:
--o-visualization VISUALIZATION
[required]
Miscellaneous:
--output-dir PATH Output unspecified results to a directory
--verbose / --quiet Display verbose output to stdout and/or stderr
during execution of this action. Or silence output if
execution is successful (silence is golden).
--example-data PATH Write example data and exit.
--citations Show citations and exit.
--use-cache DIRECTORY Specify the cache to be used for the intermediate
work of this action. If not provided, the default
cache under $TMP/qiime2/ will be used.
IMPORTANT FOR HPC USERS: If you are on an HPC system
and are using parallel execution it is important to
set this to a location that is globally accessible to
all nodes in the cluster.
--help Show this message and exit.
Import:
from qiime2.plugins.sample_classifier.visualizers import confusion_matrix
Docstring:
Make a confusion matrix from sample classifier predictions.
Make a confusion matrix and calculate accuracy of predicted vs. true values
for a set of samples classified using a sample classifier. If per-sample
class probabilities are provided, will also generate Receiver Operating
Characteristic curves and calculate area under the curve for each class.
Parameters
----------
predictions : SampleData[ClassifierPredictions]
Predicted values to plot on x axis. Should be predictions of
categorical data produced by a sample classifier.
truth : MetadataColumn[Categorical]
Metadata column (true values) to plot on y axis.
probabilities : SampleData[Probabilities], optional
Predicted class probabilities for each input sample.
missing_samples : Str % Choices('error', 'ignore'), optional
How to handle missing samples in metadata. "error" will fail if missing
samples are detected. "ignore" will cause the feature table and
metadata to be filtered, so that only samples found in both files are
retained.
vmin : Float | Str % Choices('auto'), optional
The minimum value to use for anchoring the colormap. If "auto", vmin is
set to the minimum value in the data.
vmax : Float | Str % Choices('auto'), optional
The maximum value to use for anchoring the colormap. If "auto", vmax is
set to the maximum value in the data.
palette : Str % Choices('YellowOrangeBrown', 'YellowOrangeRed', 'OrangeRed', 'PurpleRed', 'RedPurple', 'BluePurple', 'GreenBlue', 'PurpleBlue', 'YellowGreen', 'summer', 'copper', 'viridis', 'cividis', 'plasma', 'inferno', 'magma', 'sirocco', 'drifting', 'melancholy', 'enigma', 'eros', 'spectre', 'ambition', 'mysteriousstains', 'daydream', 'solano', 'navarro', 'dandelions', 'deepblue', 'verve', 'greyscale'), optional
The color palette to use for plotting.
Returns
-------
visualization : Visualization