Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mamunm committed Mar 27, 2024
1 parent b752ed6 commit 376f80b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
9 changes: 9 additions & 0 deletions experiments/test_1/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@
moboqm9 = MOBOQM9(params)
moboqm9.run_optimization()
plt = plot_results(moboqm9.dataframe)
# plt.savefig("figures/moboqm9_results.png")
plt.show()

"""
panel1 => iteration vs hv [qEHVI qNEHVI random]
panel2 => pareto front for qEHVI
panel3 => pareto front for qNEHVI
panel4 => pareto front for random
"""

5 changes: 3 additions & 2 deletions src/mobo_qm9.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ def __init__(self, params: MOBOQM9Parameters):
self.params.num_total_points)
self.features, self.targets = self.get_features_and_targets()
self.train_indices = self.get_train_indices()

self.dataframe = None

def get_features_and_targets(self):
"""
Gets the features and targets for the MOBOQM9 model.
Expand Down Expand Up @@ -94,7 +95,7 @@ def get_surrogate_model(self):
elif self.params.kernel == 'Matern':
kernel = MaternKernel()
else:
raise ValueError("Unsupported kernel type. Supported types are 'RBF', 'Matern', and 'Tanimoto'.")
raise ValueError("Unsupported kernel type. Supported types are 'RBF', and 'Matern'.")

models = [SingleTaskGP(features,
targets[:, i].unsqueeze(-1),
Expand Down
10 changes: 10 additions & 0 deletions src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,14 @@ def plot_results(df):
returns:
matplotlib.pyplot.figure: Figure for the MOBOQM9 model.
"""
#iteration | target_1 | target_2 | target_1_qeHVI | target_2_qeHVI | target_1_qNEHVI | target_2_qNEHVI | target_1_random | target_2_random
# compute the global hv
# compute the hv for each iteration up until that point
# plot iteration vs hv
# panel 2 - 4
# find the pareto front of the last iteration
# find the pareto front of all the data
# scatter plot all the data with alpha = 0.5
# global pareto front with blue
# last iteration pareto front with red *
pass

0 comments on commit 376f80b

Please sign in to comment.