accuracy_score¶
In [ ]:
accuracy_score(y_true: str,
y_score: str,
input_relation: Union[str, vDataFrame],
pos_label: Union[int, float, str] = None)
Computes the Accuracy Score.
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 | ✓ | Label to use to identify the positive class. If pos_label is NULL then the global accuracy will be computed. |
Returns¶
float : score
Example¶
In [106]:
from verticapy import vDataFrame
vDataFrame("example_classification")
Out[106]:
In [107]:
from verticapy.learn.metrics import accuracy_score
accuracy_score("y_true", "y_pred", "example_classification")
Out[107]:
