Skip to content

Commit ce57881

Browse files
fix: resolve kdd_rijn example to be without dataframe parameter and remove wrong merge files
1 parent 2c82122 commit ce57881

9 files changed

Lines changed: 11 additions & 1675 deletions

examples/40_paper/2018_kdd_rijn_example.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,19 @@
106106
size=limit_per_task,
107107
)
108108

109-
109+
performance_column = "value"
110+
# make a DataFrame consisting of all hyperparameters (which is a dict in setup['parameters']) and the performance
111+
# value (in setup['value']). The following line looks a bit complicated, but combines 2 tasks: a) combine
112+
# hyperparameters and performance data in a single dict, b) cast hyperparameter values to the appropriate format
113+
# Note that the ``json.loads(...)`` requires the content to be in JSON format, which is only the case for
114+
# scikit-learn setups (and even there some legacy setups might violate this requirement). It will work for the
115+
# setups that belong to the flows embedded in this example though.
110116
try:
111117
setups_evals = pd.DataFrame(
112118
[
113119
dict(
114120
**{name: json.loads(value) for name, value in setup["parameters"].items()},
115-
**{performance_column: setup[performance_column]}
121+
**{performance_column: setup[performance_column]},
116122
)
117123
for _, setup in evals.iterrows()
118124
]
@@ -152,7 +158,9 @@
152158
fanova_results.append(
153159
{
154160
"hyperparameter": pname.split(".")[-1],
155-
"fanova": evaluator.quantify_importance([idx])[(idx,)]["individual importance"],
161+
"fanova": evaluator.quantify_importance([idx])[(idx,)][
162+
"individual importance"
163+
],
156164
}
157165
)
158166
except RuntimeError as e:

examples/40_paper/2018_kdd_rijn_example_BACKUP_34122.py

Lines changed: 0 additions & 271 deletions
This file was deleted.

0 commit comments

Comments
 (0)