df_score¶
-
hhpy.ds.
df_score
(df: pandas.core.frame.DataFrame, y_true: Union[Sequence[T_co], int, float, str, bytes, None, AbstractSet[T_co]], y_pred: Union[Sequence[T_co], int, float, str, bytes, None, AbstractSet[T_co]] = None, pred_suffix: list = None, scores: List[Callable] = None, pivot: bool = True, scale: Union[dict, list, int] = None, groupby: Union[list, str] = None, multi: int = None, dropna: bool = True) → pandas.core.frame.DataFrame[source]¶ creates a DataFrame displaying various kind of scores
Parameters: - df – pandas DataFrame containing the true, pred data
- y_true – name of the true variable(s) inside df
- y_pred – name of the pred variable(s) inside df, specify either this or pred_suffix
- pred_suffix – name of the predicted variable suffixes. Supports multiple predictions. By default assumed suffix ‘pred’ [optional]
- scores – scoring functions to be used [optional]
- pivot – whether to pivot the DataFrame for easier readability [optional]
- scale – a scale for multiplying the scores, default 1 [optional]
- groupby – if supplied then the scores are calculated by group [optional]
- multi – how many multi outputs are there [optional]
- dropna – whether to drop na [optional]
Returns: pandas DataFrame containing al the scores