Skip to content

Optimization of ScaleTransform for SimpleKernel #104

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

Merged
merged 4 commits into from
Apr 27, 2020

Conversation

devmotion
Copy link
Member

Fixes #96 by adapting the old code to the new interface. I'm not sure, maybe there's a better way to achieve this optimization?

@willtebbutt
Copy link
Member

Thanks for taking a look at this. Before merging, could someone please explain to me why these methods are more efficient than what would otherwise happen? I'm struggling to figure it out.

@theogf
Copy link
Member

theogf commented Apr 27, 2020

Well if you would multiply x by s before evaluating the metric you would need to multiply every element of x by s first. Whereas if you do it afterwards you just do a scalar-scalar multiplication

@willtebbutt
Copy link
Member

Ah, okay. @devmotion could you add a comment to this effect?

@devmotion
Copy link
Member Author

I added a comment and constrained the optimization to AbstractVector{<:Real} to be a bit more conservative and avoid surprises for users.

Copy link
Member

@willtebbutt willtebbutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@theogf theogf merged commit 9723a5c into JuliaGaussianProcesses:master Apr 27, 2020
@devmotion devmotion deleted the _scale branch April 27, 2020 15:49
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

Successfully merging this pull request may close these issues.

_scale
3 participants