Skip to content

Commit 2371832

Browse files
author
vm-aifluence-jro
committed
changes removed on benchmark
1 parent 7651333 commit 2371832

File tree

2 files changed

+8
-24
lines changed

2 files changed

+8
-24
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ qolmat/.converge
5757
examples/*.ipynb
5858
examples/figures/*
5959
examples/data/*
60-
examples/*.ipynb
60+
examples/local
6161

6262

6363
# VSCode

examples/benchmark.md

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -145,20 +145,20 @@ imputer_regressor = imputers.ImputerRegressor(groups=["station"], estimator=Line
145145

146146
dict_imputers = {
147147
"mean": imputer_mean,
148-
"median": imputer_median,
148+
# "median": imputer_median,
149149
# "mode": imputer_mode,
150150
"interpolation": imputer_interpol,
151151
# "spline": imputer_spline,
152-
"shuffle": imputer_shuffle,
152+
# "shuffle": imputer_shuffle,
153153
# "residuals": imputer_residuals,
154154
# "OU": imputer_ou,
155-
"TSOU": imputer_tsou,
156-
"TSMLE": imputer_tsmle,
155+
# "TSOU": imputer_tsou,
156+
# "TSMLE": imputer_tsmle,
157157
# "RPCA": imputer_rpca,
158-
"RPCA_opti": imputer_rpca_opti,
158+
# "RPCA_opti": imputer_rpca_opti,
159159
# "locf": imputer_locf,
160160
# "nocb": imputer_nocb,
161-
"knn": imputer_knn,
161+
# "knn": imputer_knn,
162162
"ols": imputer_regressor,
163163
# "mice_ols": imputer_mice,
164164
}
@@ -207,21 +207,6 @@ plt.bar(df_plot.index, df_plot, color=tab10(0))
207207
plt.show()
208208
```
209209

210-
```python
211-
fig = plt.figure(figsize=(16, 6))
212-
fig.add_subplot(1, 2, 1)
213-
df_plot = results.loc["mae"].mean().sort_values(ascending=False)
214-
plt.barh(df_plot.index, df_plot, color=[tab10(0) if i<n_imputers-1 else "red" for i in range(n_imputers)])
215-
plt.xlabel("Erreur MAE")
216-
# plt.show()
217-
218-
fig.add_subplot(1, 2, 2)
219-
df_plot = results.loc["energy"].mean().sort_values(ascending=False)
220-
plt.barh(df_plot.index, df_plot, color=[tab10(0) if i<n_imputers-1 else "red" for i in range(n_imputers)])
221-
plt.xlabel("Erreur énergétique")
222-
plt.show()
223-
```
224-
225210
```python
226211
fig = plt.figure(figsize=(24, 8))
227212
fig.add_subplot(2, 1, 1)
@@ -262,9 +247,8 @@ for col in cols_to_impute:
262247
values_orig = df_station[col]
263248

264249
plt.plot(values_orig, ".", color='black', label="original")
250+
265251
for ind, (name, model) in enumerate(list(dict_imputers.items())):
266-
if name not in ["mean", "TSMLE"]:
267-
continue
268252
values_imp = dfs_imputed_station[name][col].copy()
269253
values_imp[values_orig.notna()] = np.nan
270254
plt.plot(values_imp, ".", color=tab10(ind), label=name, alpha=1)

0 commit comments

Comments
 (0)