ertk.train.scores_to_df

ertk.train.scores_to_df(scores: Dict[str, ndarray], index: Index | Iterable | None = None)

Convert scikit-learn scores dictionary to pandas dataframe.

Parameters:
scores: dict

Scores dictionary. Each key is a string and all values are either scalar or arrays.

index: pd.Index or iterable, optional

Optional index to use. Must have the same length as each value in scores. If not given a pd.RangeIndex is used.

Returns:
pd.DataFrame

Scores dataframe, with a column per key in scores and row per item in each value array.