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

Make squared l2 distance? #597

Open
vnmabus opened this issue Feb 9, 2024 · 1 comment
Open

Make squared l2 distance? #597

vnmabus opened this issue Feb 9, 2024 · 1 comment

Comments

@vnmabus
Copy link
Member

vnmabus commented Feb 9, 2024

Motivation

In some cases, such as in the Gaussian (RBF) kernel we compute the squared of the L2 distance, which undoes the last sqrt made in the distance.

Desired functionality

We should analyze if we want to provide a squared l2 distance, similar to sqeuclidean in Scipy.

Alternatives

No response

Additional context

No response

@eliegoudout
Copy link
Contributor

I know it's not really conventional, but imo, it'd be simpler to add an optional kw raised: bool = False to functions like norm, disabling the final ** 1 / p op. Unless some optimization magic makes it so that the function doesn't actually use ** 1 / p at the end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants