prc_curve¶
In [ ]:
prc_curve(y_true: str,
y_score: str,
input_relation: (str, vDataFrame),
pos_label: (int, float, str) = 1,
nbins: int = 30,
auc_prc: bool = False,
ax=None,
**style_kwds,)
Draws the PRC Curve.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
y_true | str | ❌ | Response column. |
y_score | str | ❌ | Prediction Probability. |
input_relation | str / vDataFrame | ❌ | Relation to use to do the scoring. The relation can be a view or a table or even a 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 Curve, one of the response column class has to be the positive one. The parameter 'pos_label' represents this class. |
nbins | int | ✓ | Curve number of bins. |
auc_prc | bool | ✓ | If set to True, the function will return the PRC AUC without drawing the curve. |
ax | Matplotlib axes object | ✓ | The axes to plot on. |
**style_kwds | any | ✓ | Any optional parameter to pass to the Matplotlib functions. |
Returns¶
tablesample : An object containing the result. For more information, see utilities.tablesample.
Example¶
In [7]:
from verticapy import vDataFrame
vDataFrame("example_classification")
Out[7]:
In [8]:
from verticapy.learn.model_selection import prc_curve
prc_curve("y_true", "y_score", "example_classification")
Out[8]:
