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
Clusters in HitMapView #24
Comments
Hi @anjomshoaa there was an issue in som.cluster() that it didn't set the cluster labels. Now should be fine. |
Thanks Vahid jan, Yes, it is working perfectly now. Best regards |
Is there a way to get the index of the training data for the individual cluster labels? |
by clustering you get the labels of nodes. By project function you get the bmus. So, then use something like this |
Thanks for the direction.
Is there a som.project() function available?
Regards,
Vijay Raajaa GS
…On Tue, Aug 29, 2017 at 7:54 PM, Vahid Moosavi ***@***.***> wrote:
by clustering you get the labels of nodes. By project function you get the
bmus. So, then use something like this
cl = som.cluster(n_clusters=3)
bmus = som.project()
cl_data = cl[bmus]
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#24 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEIJ1hcZKAdS6-VjaXFtqoqibRXxE9yqks5sdB8zgaJpZM4JCl4u>
.
|
Yes, there is one. Line 433 in c673b19
|
Using the project_data function , I need to project back the training data to the trained model? Also, from the bmus, how do I tie it back to the original training data index? Essentially I would like to find the list of training data index corresponding to the cluster label. |
@gsvijayraajaa Did you get a way get the output category label back to data. |
to cluster the neurons into 4 clusterscl = som.cluster(n_clusters=4) this will map the data X to the respective neurons in sombmus = som.project_data(X) this gives the corresponding cluster number for the data in Xcl_data = cl[bmus] |
Thanks it worked! |
Hey @sevamoo, really need help with this issue. I have a dataset of length 50,000 when i do cl = som.cluster(n_clusters=2) cl returns lables which is fine but the length of 1120. Which is understandable because the data points are under a cluster. but when I do cl_data = cl[bmus], this creates duplicate indexs like there would be 7 1's 5 2's and so on, which is not correct because the model wouldn't use duplicated values. Any advice on this would be appreciated. I believe it has something to do with the length of cl the 1120 |
I have used the below code: to find label and index of cluster: How do I find which cluster my data belongs to? N_CLUSTERS = 3 but it is showing error: item length not match |
I believe this is the answer you are looking for: cl_data = cl[bmus] |
Hi Sevamoo, I have a question, in the som.cluster(n_clusters = 8), I have set 8 clusters and it gives me clusters from 0 to 7. However, my test set labels are from 1 to 8 and when I use accuracy_score it obviously gives me a wrong accuracy. I wanted to know if there is a way to set the cluster number from 1 to 8 ? Would really appreciate your help. Sincerely, |
Did you have some help to accomplish that list of training index? |
Hi,
I have a question about the HitMapView. I do clustering as follows and the output is perfectly fine:
cl = som.cluster(n_clusters=3)
But the HitMapView always uses the default number of clusters which is 8 and I could not find a way to change it:
h = hitmap.HitMapView(10, 10, 'hitmap', text_size=8, show_text=True)
How can I specify number of clusters in a HitMapView to a different number?
Regards
Amin
The text was updated successfully, but these errors were encountered: