Skip to content

Commit d7de49f

Browse files
v0.0.57 sklearn updated
1 parent 16490e0 commit d7de49f

8 files changed

Lines changed: 1675 additions & 1553 deletions

File tree

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,3 +422,23 @@ Figures.d/13-torch_bartz09_10min_5init_2023-05-06_18-24-09_progress.pdf
422422
Figures.d/12-torch_p040025_1min_5init_2023-05-07_10-00-44_progress.pdf
423423
Figures.d/12-torch_p040025_1min_5init_2023-05-07_10-00-44_importance.pdf
424424
Figures.d/12-torch_p040025_1min_5init_2023-05-07_10-00-44_contour_2_3.pdf
425+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-19-36_importance.pdf
426+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-19-36_progress.pdf
427+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-31-38_importance.pdf
428+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-31-38_progress.pdf
429+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-49-08_contour_1_3.pdf
430+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-49-08_contour_1_5.pdf
431+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-49-08_contour_1_9.pdf
432+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-49-08_contour_3_5.pdf
433+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-49-08_contour_3_9.pdf
434+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-49-08_contour_5_9.pdf
435+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-49-08_importance.pdf
436+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_12-49-08_progress.pdf
437+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_13-06-20_contour_1_3.pdf
438+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_13-06-20_contour_1_8.pdf
439+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_13-06-20_contour_1_9.pdf
440+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_13-06-20_contour_3_8.pdf
441+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_13-06-20_contour_3_9.pdf
442+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_13-06-20_contour_8_9.pdf
443+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_13-06-20_importance.pdf
444+
Figures.d/10-sklearn_bartz09_1min_10init_2023-05-07_13-06-20_progress.pdf

notebooks/10_spot_hpt_sklearn.ipynb

Lines changed: 1551 additions & 142 deletions
Large diffs are not rendered by default.

notebooks/11_spot_hpt_torch_fashion_mnist.ipynb

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2680,7 +2680,7 @@
26802680
}
26812681
],
26822682
"source": [
2683-
"spot_torch = spot.Spot(fun=fun,\n",
2683+
"spot_tuner = spot.Spot(fun=fun,\n",
26842684
" lower = lower,\n",
26852685
" upper = upper,\n",
26862686
" fun_evals = inf,\n",
@@ -2708,7 +2708,7 @@
27082708
" \"model_fun_evals\": 10_000,\n",
27092709
" \"log_level\": 50\n",
27102710
" })\n",
2711-
"spot_torch.run(X_start=X_start)"
2711+
"spot_tuner.run(X_start=X_start)"
27122712
]
27132713
},
27142714
{
@@ -2731,12 +2731,12 @@
27312731
"if SAVE:\n",
27322732
" result_file_name = \"res_\" + experiment_name + \".pkl\"\n",
27332733
" with open(result_file_name, 'wb') as f:\n",
2734-
" pickle.dump(spot_torch, f)\n",
2734+
" pickle.dump(spot_tuner, f)\n",
27352735
"\n",
27362736
"if LOAD:\n",
27372737
" result_file_name = \"res_ch10-friedman-hpt-0_maans03_60min_20init_1K_2023-04-14_10-11-19.pkl\"\n",
27382738
" with open(result_file_name, 'rb') as f:\n",
2739-
" spot_torch = pickle.load(f)"
2739+
" spot_tuner = pickle.load(f)"
27402740
]
27412741
},
27422742
{
@@ -2764,7 +2764,7 @@
27642764
}
27652765
],
27662766
"source": [
2767-
"spot_torch.plot_progress(log_y=False, filename=\"../Figures.d/\" + experiment_name+\"_progress.pdf\")"
2767+
"spot_tuner.plot_progress(log_y=False, filename=\"../Figures.d/\" + experiment_name+\"_progress.pdf\")"
27682768
]
27692769
},
27702770
{
@@ -2797,7 +2797,7 @@
27972797
}
27982798
],
27992799
"source": [
2800-
"print(gen_design_table(fun_control=fun_control, spot=spot_torch))"
2800+
"print(gen_design_table(fun_control=fun_control, spot=spot_tuner))"
28012801
]
28022802
},
28032803
{
@@ -2825,7 +2825,7 @@
28252825
}
28262826
],
28272827
"source": [
2828-
"spot_torch.plot_importance(threshold=0.025, filename=\"../Figures.d/\" + experiment_name+\"_importance.pdf\")"
2828+
"spot_tuner.plot_importance(threshold=0.025, filename=\"../Figures.d/\" + experiment_name+\"_importance.pdf\")"
28292829
]
28302830
},
28312831
{
@@ -2910,7 +2910,7 @@
29102910
}
29112911
],
29122912
"source": [
2913-
"X = spot_torch.to_all_dim(spot_torch.min_X.reshape(1,-1))\n",
2913+
"X = spot_tuner.to_all_dim(spot_tuner.min_X.reshape(1,-1))\n",
29142914
"print(X)"
29152915
]
29162916
},
@@ -3072,7 +3072,7 @@
30723072
}
30733073
],
30743074
"source": [
3075-
"min(spot_torch.y), max(spot_torch.y)"
3075+
"min(spot_tuner.y), max(spot_tuner.y)"
30763076
]
30773077
},
30783078
{
@@ -3089,8 +3089,8 @@
30893089
"metadata": {},
30903090
"source": [
30913091
"* For productive use, you might want to select:\n",
3092-
" * `min_z=min(spot_torch.y)` and\n",
3093-
" * `max_z = max(spot_torch.y)`\n",
3092+
" * `min_z=min(spot_tuner.y)` and\n",
3093+
" * `max_z = max(spot_tuner.y)`\n",
30943094
"* These settings are not so colorful as visualizations that use `None` for the ranges, but give better insights."
30953095
]
30963096
},
@@ -3141,16 +3141,16 @@
31413141
],
31423142
"source": [
31433143
"threshold = 0.025\n",
3144-
"impo = spot_torch.print_importance(threshold=threshold, print_screen=True)\n",
3144+
"impo = spot_tuner.print_importance(threshold=threshold, print_screen=True)\n",
31453145
"var_plots = [i for i, x in enumerate(impo) if x[1] > threshold]\n",
3146-
"min_z = min(spot_torch.y)\n",
3147-
"max_z = max(spot_torch.y)\n",
3148-
"n = spot_torch.k\n",
3146+
"min_z = min(spot_tuner.y)\n",
3147+
"max_z = max(spot_tuner.y)\n",
3148+
"n = spot_tuner.k\n",
31493149
"for i in var_plots:\n",
31503150
" for j in var_plots:\n",
31513151
" if j > i:\n",
31523152
" filename = \"../Figures.d/\" + experiment_name+\"_contour_\"+str(i)+\"_\"+str(j)+\".pdf\"\n",
3153-
" spot_torch.plot_contour(i=i, j=j, min_z=min_z, max_z = max_z, filename=filename)"
3153+
" spot_tuner.plot_contour(i=i, j=j, min_z=min_z, max_z = max_z, filename=filename)"
31543154
]
31553155
},
31563156
{
@@ -4694,7 +4694,7 @@
46944694
}
46954695
],
46964696
"source": [
4697-
"spot_torch.parallel_plot()"
4697+
"spot_tuner.parallel_plot()"
46984698
]
46994699
},
47004700
{
@@ -4715,10 +4715,10 @@
47154715
"source": [
47164716
"PLOT_ALL = False\n",
47174717
"if PLOT_ALL:\n",
4718-
" n = spot_torch.k\n",
4718+
" n = spot_tuner.k\n",
47194719
" for i in range(n-1):\n",
47204720
" for j in range(i+1, n):\n",
4721-
" spot_torch.plot_contour(i=i, j=j, min_z=min_z, max_z = max_z)"
4721+
" spot_tuner.plot_contour(i=i, j=j, min_z=min_z, max_z = max_z)"
47224722
]
47234723
}
47244724
],

0 commit comments

Comments
 (0)