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

Is there a way to obtain a distance of each point to its BMU? #134

Open
JMiklaszewski opened this issue Mar 27, 2022 · 1 comment
Open
Labels

Comments

@JMiklaszewski
Copy link

Hi, first and foremost thank you for your great work and allowing to implement SOM algorithm in such convienent way.
I wanted to ask if there is a possibility to obtain a kind of list with the distances between each point and its Best Matching Unit (Node) on trained SOM grid? I have read the documentation and saw different attributes for the SOM object, however it appears to me that none of them allow to return the (euclidean) distance to BMU. Thanks in advance for support!

@JustGlowing
Copy link
Owner

hi there,

you can do compute the distance from the BMU as follows for a given samples as follows

  1. pick the coordinates of the BUM using the method winner
  2. retrieve the weights with get_weights and isolate the weights of the BMU
  3. compute the distance between your sample and the weights of the BMU

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

No branches or pull requests

2 participants