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

vectorize infogain computationa cross all candidate acquisition points #2

Open
lukasheinrich opened this issue Dec 1, 2018 · 0 comments

Comments

@lukasheinrich
Copy link
Collaborator

A major bottleneck is the fact that we compute the info gain is python loop for each point separately. It' s conceivable that this can be vectorized, but probably this will require breaking up the kernel components of the GP and writing the vectorized computation by hand for each given kernel.

i.e. instead of

def info_gain(x_candidate,...)
    X_all = np.concatenate([np.array([x_candidate]), meanX]).reshape(1 + n_samples, -1)
    tocat = []
    for gp in gps:
        K_trans_all = gp.kernel_(X_all, gp.X_train_)

[info_gain(x,...) for x in scandetails.acqX]

do

info_gains(scandetails.acqX,...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant