sort¶
-
Scores.
sort
(key: Callable[[getml.pipeline.score.Score], Union[float, int, str]], descending: bool = False) → getml.pipeline.scores_container.Scores[source]¶ Sorts the scores container.
- Args:
- key (callable, optional):
A callable that evaluates to a sort key for a given item.
- descending (bool, optional):
Whether to sort in descending order.
- Return:
getml.pipeline.Scores
:A container of sorted scores.
- Example:
by_auc = pipe.scores.sort(key=lambda score: score.auc) most_recent_first = pipe.scores.sort(key=lambda score: score.date_time, descending=True)