lift_chart¶
In [ ]:
lift_chart(y_true: str,
y_score: str,
input_relation: (str, vDataFrame),
pos_label: (int, float, str) = 1,
nbins: int = 30,
ax=None,
**style_kwds,)
Draws a Lift Chart.
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 Lift Chart, 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. |
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 [15]:
from verticapy import vDataFrame
vDataFrame("example_classification")
Out[15]:
In [16]:
from verticapy.learn.model_selection import lift_chart
lift_chart("y_true", "y_score", "example_classification")
Out[16]: