qiskit-documentation/docs/api/qiskit/0.29/qiskit.aqua.utils.map_label...

28 lines
869 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: map_label_to_class_name
description: API reference for qiskit.aqua.utils.map_label_to_class_name
in_page_toc_min_heading_level: 1
python_api_type: function
python_api_name: qiskit.aqua.utils.map_label_to_class_name
---
# qiskit.aqua.utils.map\_label\_to\_class\_name
<Function id="qiskit.aqua.utils.map_label_to_class_name" isDedicatedPage={true} github="https://github.com/qiskit-community/qiskit-aqua/tree/stable/0.9/qiskit/aqua/utils/dataset_helper.py" signature="map_label_to_class_name(predicted_labels, label_to_class)">
Helper converts labels (numeric) to class name (string)
**Parameters**
* **predicted\_labels** (*numpy.ndarray*) Nx1 array
* **label\_to\_class** (*dict or list*) a mapping form label (numeric) to class name (str)
**Returns**
predicted class names of each datum
**Return type**
str
</Function>