-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_convergence_plots.py
22 lines (17 loc) · 1.04 KB
/
get_convergence_plots.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import numpy as np
from package import MakePlot as mp
# specify datasets to run -- choices = ["Diffusion", "Friedman_500", "Perovskite"]
datasets = ["Perovskite"]
# specify models to run -- choices = ["RF", "LR", "GPR"]
models = ["RF", "LR"]
saveplot = True
for dataset in datasets:
for model in models:
a_nll = np.load('data_for_paper_plots/{}/{}/Convergence/a_nll.npy'.format(dataset, model))
b_nll = np.load('data_for_paper_plots/{}/{}/Convergence/b_nll.npy'.format(dataset, model))
# Create and save plots
MP = mp.MakePlot()
MP.make_convergence_plot(a_nll, "{}, {}, NLL Optimization".format(model, dataset), "a (slope)", save=saveplot,
file_name='Supplemental_Info/{}/5-fold/{}/Convergence_Plots/a_nll'.format(dataset, model))
MP.make_convergence_plot(b_nll, "{}, {}, NLL Optimization".format(model, dataset), "b (intercept)", save=saveplot,
file_name='Supplemental_Info/{}/5-fold/{}/Convergence_Plots/b_nll'.format(dataset, model))