getml.project.Pipelines
Pipelines(data=None)
Container which holds all pipelines associated with the currently running project. The container supports slicing and is sort- and filterable.
Example
Show the first 10 pipelines belonging to the current project:
getml.project.pipelines[:10]
import matplotlib.pyplot as plt
hyperopt_scores = [(score.date_time, score.mae) for pipe in getml.project.pipelines
for score in pipe.scores["data_test"]
if "hyperopt" in pipe.tags]
fig, ax = plt.subplots()
ax.bar(*zip(*hyperopt_scores))
Source code in getml/project/containers/pipelines.py
50 51 52 53 54 55 56 |
|
sort
Sorts the pipelines container.
PARAMETER | DESCRIPTION |
---|---|
key | A callable that evaluates to a sort key for a given item. TYPE: |
descending | Whether to sort in descending order. TYPE: |
RETURNS | DESCRIPTION |
---|---|
Pipelines | A container of sorted pipelines. |
Example
by_auc = getml.project.pipelines.sort(key=lambda pipe: pipe.auc)
by_fl = getml.project.pipelines.sort(key=lambda pipe: pipe.feature_learners[0].type)
Source code in getml/project/containers/pipelines.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
|
filter
Filters the pipelines container.
PARAMETER | DESCRIPTION |
---|---|
conditional | A callable that evaluates to a boolean for a given item. TYPE: |
RETURNS | DESCRIPTION |
---|---|
Pipelines | A container of filtered pipelines. |
Example
pipelines_with_tags = getml.project.pipelines.filter(lambda pipe: len(pipe.tags) > 0)
accurate_pipes = getml.project.pipelines.filter(lambda pipe: all(acc > 0.9 for acc in pipe.accuracy))
Source code in getml/project/containers/pipelines.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 |
|