acc¶
-
hhpy.ds.
acc
(y_true: Union[pandas.core.series.Series, str], y_pred: Union[pandas.core.series.Series, str], df: pandas.core.frame.DataFrame = None) → float[source]¶ calculate accuracy for a categorical label
Parameters: - y_true – true values as name of df or vector data
- y_pred – predicted values as name of df or vector data
- df – pandas DataFrame containing true and predicted values [optional]
Returns: accuracy a percentage