prc_auc¶
In [ ]:
prc_auc(y_true: str,
y_score: str,
input_relation: Union[str, vDataFrame],
pos_label: Union[int, float, str] = 1,
nbins: int = 10000,)
Computes the PRC AUC (Area Under Curve).
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
y_true | str | ❌ | Response column. |
y_score | str | ❌ | Prediction Probability. |
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. |
pos_label | int / float / str | ✓ | To compute the PRC AUC, one of the response column class has to be the positive one. The parameter 'pos_label' represents this class. |
nbins | int | ✓ | An integer value that determines the number of decision boundaries. Decision boundaries are set at equally spaced intervals between 0 and 1, inclusive. Greater values for nbins give more precise estimations of the AUC, but can potentially decrease performance. The maximum value is 999,999. If negative, the maximum value is used. |
Returns¶
float : score
Example¶
In [143]:
from verticapy import vDataFrame
vDataFrame("example_classification")
Out[143]:
In [144]:
from verticapy.learn.metrics import prc_auc
prc_auc("y_true", "y_score", "example_classification")
Out[144]:
