getml.pipeline.Scores
Container which holds the history of all scores associated with a given pipeline. The container supports slicing and is sort- and filterable.
PARAMETER | DESCRIPTION |
---|---|
data | A list of |
latest | A dictionary containing the latest scores for each metric. |
Source code in getml/pipeline/scores_container.py
38 39 40 41 42 43 44 45 46 47 48 49 |
|
accuracy property
A convenience wrapper to retrieve the accuracy
from the latest scoring run.
auc property
A convenience wrapper to retrieve the auc
from the latest scoring run.
cross_entropy property
A convenience wrapper to retrieve the cross entropy
from the latest scoring run.
mae property
rmse property
rsquared property
filter
Filters the scores container.
PARAMETER | DESCRIPTION |
---|---|
conditional | A callable that evaluates to a boolean for a given item. |
RETURNS | DESCRIPTION |
---|---|
Scores | A container of filtered scores. |
Example
from datetime import datetime, timedelta
one_week_ago = datetime.today() - timedelta(days=7)
scores_last_week = pipe.scores.filter(lambda score: score.date_time >= one_week_ago)
Source code in getml/pipeline/scores_container.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
sort
Sorts the scores container.
PARAMETER | DESCRIPTION |
---|---|
key | A callable that evaluates to a sort key for a given item. |
descending | Whether to sort in descending order. TYPE: |
RETURNS | DESCRIPTION |
---|---|
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)
Source code in getml/pipeline/scores_container.py
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
|