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

Quantization always uses Euclidean distance #192

Open
ArlexMR opened this issue Aug 30, 2024 · 2 comments
Open

Quantization always uses Euclidean distance #192

ArlexMR opened this issue Aug 30, 2024 · 2 comments

Comments

@ArlexMR
Copy link

ArlexMR commented Aug 30, 2024

Hi, thanks for this great SOM implementation.

I need to train a SOM using a custom distance function (specifically, Dynamic Time Warping from the tslearn package). However, I’ve noticed that within the self.quantization method, BMUs are computed using self._distance_from_weights, which uses Euclidean distance. Wouldn’t it be more consistent to compute BMUs using self._activation_distance instead since that is the distance metric used during training?

@JustGlowing
Copy link
Owner

hi @ArlexMR, this sounds like a good enhancement and I'll keep it in mind for future release.

@ArlexMR
Copy link
Author

ArlexMR commented Sep 2, 2024

Great! I can create a pull request with that change if you find it helpful

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