|
2680 | 2680 | } |
2681 | 2681 | ], |
2682 | 2682 | "source": [ |
2683 | | - "spot_torch = spot.Spot(fun=fun,\n", |
| 2683 | + "spot_tuner = spot.Spot(fun=fun,\n", |
2684 | 2684 | " lower = lower,\n", |
2685 | 2685 | " upper = upper,\n", |
2686 | 2686 | " fun_evals = inf,\n", |
|
2708 | 2708 | " \"model_fun_evals\": 10_000,\n", |
2709 | 2709 | " \"log_level\": 50\n", |
2710 | 2710 | " })\n", |
2711 | | - "spot_torch.run(X_start=X_start)" |
| 2711 | + "spot_tuner.run(X_start=X_start)" |
2712 | 2712 | ] |
2713 | 2713 | }, |
2714 | 2714 | { |
|
2731 | 2731 | "if SAVE:\n", |
2732 | 2732 | " result_file_name = \"res_\" + experiment_name + \".pkl\"\n", |
2733 | 2733 | " with open(result_file_name, 'wb') as f:\n", |
2734 | | - " pickle.dump(spot_torch, f)\n", |
| 2734 | + " pickle.dump(spot_tuner, f)\n", |
2735 | 2735 | "\n", |
2736 | 2736 | "if LOAD:\n", |
2737 | 2737 | " result_file_name = \"res_ch10-friedman-hpt-0_maans03_60min_20init_1K_2023-04-14_10-11-19.pkl\"\n", |
2738 | 2738 | " with open(result_file_name, 'rb') as f:\n", |
2739 | | - " spot_torch = pickle.load(f)" |
| 2739 | + " spot_tuner = pickle.load(f)" |
2740 | 2740 | ] |
2741 | 2741 | }, |
2742 | 2742 | { |
|
2764 | 2764 | } |
2765 | 2765 | ], |
2766 | 2766 | "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\")" |
2768 | 2768 | ] |
2769 | 2769 | }, |
2770 | 2770 | { |
|
2797 | 2797 | } |
2798 | 2798 | ], |
2799 | 2799 | "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))" |
2801 | 2801 | ] |
2802 | 2802 | }, |
2803 | 2803 | { |
|
2825 | 2825 | } |
2826 | 2826 | ], |
2827 | 2827 | "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\")" |
2829 | 2829 | ] |
2830 | 2830 | }, |
2831 | 2831 | { |
|
2910 | 2910 | } |
2911 | 2911 | ], |
2912 | 2912 | "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", |
2914 | 2914 | "print(X)" |
2915 | 2915 | ] |
2916 | 2916 | }, |
|
3072 | 3072 | } |
3073 | 3073 | ], |
3074 | 3074 | "source": [ |
3075 | | - "min(spot_torch.y), max(spot_torch.y)" |
| 3075 | + "min(spot_tuner.y), max(spot_tuner.y)" |
3076 | 3076 | ] |
3077 | 3077 | }, |
3078 | 3078 | { |
|
3089 | 3089 | "metadata": {}, |
3090 | 3090 | "source": [ |
3091 | 3091 | "* 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", |
3094 | 3094 | "* These settings are not so colorful as visualizations that use `None` for the ranges, but give better insights." |
3095 | 3095 | ] |
3096 | 3096 | }, |
|
3141 | 3141 | ], |
3142 | 3142 | "source": [ |
3143 | 3143 | "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", |
3145 | 3145 | "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", |
3149 | 3149 | "for i in var_plots:\n", |
3150 | 3150 | " for j in var_plots:\n", |
3151 | 3151 | " if j > i:\n", |
3152 | 3152 | " 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)" |
3154 | 3154 | ] |
3155 | 3155 | }, |
3156 | 3156 | { |
|
4694 | 4694 | } |
4695 | 4695 | ], |
4696 | 4696 | "source": [ |
4697 | | - "spot_torch.parallel_plot()" |
| 4697 | + "spot_tuner.parallel_plot()" |
4698 | 4698 | ] |
4699 | 4699 | }, |
4700 | 4700 | { |
|
4715 | 4715 | "source": [ |
4716 | 4716 | "PLOT_ALL = False\n", |
4717 | 4717 | "if PLOT_ALL:\n", |
4718 | | - " n = spot_torch.k\n", |
| 4718 | + " n = spot_tuner.k\n", |
4719 | 4719 | " for i in range(n-1):\n", |
4720 | 4720 | " 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)" |
4722 | 4722 | ] |
4723 | 4723 | } |
4724 | 4724 | ], |
|
0 commit comments