multilabel_confusion_matrix¶
In [ ]:
multilabel_confusion_matrix(y_true: str,
y_score: str,
input_relation: Union[str, vDataFrame],
labels: list)
Computes the Multi Label Confusion Matrix.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
y_true | str | ❌ | Response column. |
y_score | str | ❌ | Prediction. |
input_relation | str / vDataFrame | ❌ | The relation used for scoring. This relation can be a view, table, or customized relation. For example, you could write: "(SELECT ... FROM ...) x" as long as an alias is given at the end of the relation. |
labels | list | ❌ | List of the response column categories. |
Returns¶
tablesample : An object containing the result. For more information, see utilities.tablesample.
Example¶
In [139]:
from verticapy import vDataFrame
vDataFrame("example_classification")
Out[139]:
In [140]:
from verticapy.learn.metrics import multilabel_confusion_matrix
multilabel_confusion_matrix("y_true",
"y_pred",
"example_classification",
labels = [0, 1])
Out[140]:
