critical_success_index¶
In [ ]:
critical_success_index(y_true: str,
y_score: str,
input_relation: Union[str, vDataFrame],
pos_label: Union[int, float, str] = 1)
Computes the Critical Success Index.
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. |
pos_label | int / float / str | ✓ | To compute the CSI, one of the response column class has to be the positive one. The parameter 'pos_label' represents this class. |
Returns¶
float : score
Example¶
In [114]:
from verticapy import vDataFrame
vDataFrame("example_classification")
Out[114]:
In [115]:
from verticapy.learn.metrics import critical_success_index
critical_success_index("y_true", "y_pred", "example_classification")
Out[115]:
