Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch aepsych select_inducing_points from soon-to-be-deprecated BoTorch function to replacement with equivalent behavior (#235) #239

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions aepsych/models/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import numpy as np
import torch
from botorch.models.approximate_gp import _select_inducing_points
from botorch.models.utils.inducing_point_allocators import GreedyVarianceReduction
from botorch.utils.sampling import draw_sobol_samples
from gpytorch.kernels import Kernel
from gpytorch.likelihoods import BernoulliLikelihood
Expand Down Expand Up @@ -76,7 +76,8 @@ def select_inducing_points(
method = "kmeans++"

if method == "pivoted_chol":
inducing_points = _select_inducing_points(
inducing_point_allocator = GreedyVarianceReduction()
inducing_points = inducing_point_allocator.allocate_inducing_points(
inputs=X,
covar_module=covar_module,
num_inducing=inducing_size,
Expand Down