Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move consolidate_duplicates to BoTorch and consolidate duplicates in …
…PairwiseGP (facebook#1536) Summary: Pull Request resolved: facebook#1536 X-link: pytorch/botorch#1754 # Context One problem for GP models is that when evaluating points that are close, it is likely to trigger numerical issues resulted from non-PSD covariance matrix. The problem is particularly pronounced and hard to bypass when doing optimization (either BOPE or preferential BO) as we would need to repetitively compare points to the incumbent. To improve preference learning stability, we can automatically consolidate the same (or numerically similar points) into the same point. For example, with training data `datapoints = [[1, 2], [3, 4], [1, 2], [5, 6]]` and `comparisons = [[0, 1], [2, 3]]` with be turned into the consolidated `datapoints = [[1, 2], [3, 4], [5, 6]]` and `comparisons = [[0, 1], [0, 2]]`. This shouldn't lead to any changes model fitting as the likelihood remains the same. # Code changes To implement this, following changes are made - Upstreamed the `consolidate_duplicates` and related helper functions from `Ax` to `Botorch`. - Implicitly replace `datapoint` and `comparisons` in `PairwiseGP` with the consolidated ones. - Added `unconsolidated_datapoints`, `unconsolidated_comparisons`, and `unconsolidated_utility` in case the user would like to access the original data and the corresponding utility directly from the model. Reviewed By: Balandat Differential Revision: D44126864 fbshipit-source-id: dc0b25d53a859f27226192d3efa61036c4948cc1
- Loading branch information