Skip to content

Commit

Permalink
fix: predict on observables
Browse files Browse the repository at this point in the history
  • Loading branch information
maffettone committed Dec 14, 2023
1 parent 7e00df5 commit 974a022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdf_agents/sklearn.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def _sample_uncertainty_proxy(self, batch_size=1):
else:
# assume a 2d scan, use a linear model to predict the uncertainty
grid = make_wafer_grid_list(*self.bounds.ravel(), step=self.motor_resolution)
labels = self.model.predict(sorted_independents)
labels = self.model.predict(sorted_observables)
proby_preds = LogisticRegression().fit(sorted_independents, labels).predict_proba(grid)
shannon = -np.sum(proby_preds * np.log(1 / proby_preds), axis=-1)
top_indicies = np.argsort(shannon)[-batch_size:]
Expand Down

0 comments on commit 974a022

Please sign in to comment.