tag:blogger.com,1999:blog-1693014329567144872.comments2017-03-24T13:01:05.407+00:00The Glowing PythonJustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comBlogger680125tag:blogger.com,1999:blog-1693014329567144872.post-60497150625391957032017-03-17T15:08:10.157+00:002017-03-17T15:08:10.157+00:00Hey I was trying to run the code but it is showing...Hey I was trying to run the code but it is showing various types of errors even after installing all the required modules .Unknownhttp://www.blogger.com/profile/17910182901068884955noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-24110160905634705622017-03-14T22:23:45.054+00:002017-03-14T22:23:45.054+00:00Hi,
I am having a trouble with your pylab code fr...Hi,<br /><br />I am having a trouble with your pylab code from your example digits.py which I found here: https://github.com/JustGlowing/minisom/blob/master/examples/example_digits.py<br /><br />I have digits images I want to plot but the problem is a window titled figure 1 comes up with an axis all by itself and a separate window titled figure 2 pops up with the clustered images but without an axis. I tried to combine the 2 figures by removing figure(2) from the code and even though only one window titled figure 1 pops up there is no axis, just the clusteted images alone. On top of that not all of the clustered images are shown up. Do you know of anyone else having this problem who fixed it or if there is a way to combine the 2 figures or a way for it the axis and clustered images to show up using 1 figure?<br /><br />ThanksAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-88687178151695656642017-03-08T03:50:36.443+00:002017-03-08T03:50:36.443+00:00Hi JustGlowing,
Thanks. The reason why I am askin...Hi JustGlowing,<br /><br />Thanks. The reason why I am asking this is that the clustering results and quantization errors are different from the results I got from MATLAB somtoolbox. After reviewing all the codes inside, I think the possible reason maybe the parameter settings on the training stage. After all, I think you did a brilliant job. Thanks!Jianshe Fenghttp://www.blogger.com/profile/03394263323116454513noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-62191954548728149162017-03-07T13:09:21.374+00:002017-03-07T13:09:21.374+00:00Hi Jianshe, there's no way to do that without ...Hi Jianshe, there's no way to do that without changing the code currently. The philosophy of the project is to be minimal.JustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-79131951149461395722017-03-07T13:01:45.698+00:002017-03-07T13:01:45.698+00:00Hi, is there a way to change the "lattice&quo...Hi, is there a way to change the "lattice", "shape" and "neigh" of the map? Thanks!Jianshe Fenghttp://www.blogger.com/profile/03394263323116454513noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-69054554751549543842017-03-07T08:59:46.930+00:002017-03-07T08:59:46.930+00:00Hi, I'm not sure this is exactly what you need...Hi, I'm not sure this is exactly what you need but can help you: https://github.com/JustGlowing/minisom/blob/master/minisom.py#L167JustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-21966329398503644272017-03-06T08:37:51.611+00:002017-03-06T08:37:51.611+00:00Hi, do you have any function to calculate the SOM-...Hi, do you have any function to calculate the SOM-MQE? Thanks!Unknownhttp://www.blogger.com/profile/03394263323116454513noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-34096276066318022832017-02-20T13:26:12.792+00:002017-02-20T13:26:12.792+00:00Thank you very much for your reply.Thank you very much for your reply.DS Enthusiasthttp://www.blogger.com/profile/10704468037247955390noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-24613495949696253772017-02-20T09:07:13.072+00:002017-02-20T09:07:13.072+00:00hi, winner() can't be inverted, but win_map() ...hi, winner() can't be inverted, but win_map() will solve your problem.JustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-50664661051974435212017-02-20T04:40:10.081+00:002017-02-20T04:40:10.081+00:00Hi,
thank you for this great library.
When we fi...Hi,<br /><br />thank you for this great library.<br /><br />When we find the outliers on the map by looking at the highest distance (close to 1), how can we know to which observation in the original data it corresponds ? In other words, is there an inverse function of the winner() function to reverse the mapping from the input space to the output map ?<br /><br />Thanks for your help.DS Enthusiasthttp://www.blogger.com/profile/10704468037247955390noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-46181346764608605362017-02-09T12:46:05.987+00:002017-02-09T12:46:05.987+00:00Yes, with t[cnt] the label of the sample is consid...Yes, with t[cnt] the label of the sample is considered to assign a color to the corresponding marker.JustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-29466361654616721662017-02-09T12:21:43.203+00:002017-02-09T12:21:43.203+00:00Hi, thankyou fot the fast response. I shall try th...Hi, thankyou fot the fast response. I shall try this, thank you.<br />I have labels associated with each image in the dataset very similar to t in your example. I want to associate the winner with a label if possible. When you use a for loop and use the enumerate function on the data, is the code t[cnt] associating your t label with the winner?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-19257485333429616642017-02-09T07:17:19.323+00:002017-02-09T07:17:19.323+00:00Hi, you need to use the method winner on each samp...Hi, you need to use the method winner on each sample in your dataset and save the result in a format accepted by your MLP implementation.JustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-80693604055315706072017-02-09T03:41:11.462+00:002017-02-09T03:41:11.462+00:00Hi, that's a great library you have implemente...Hi, that's a great library you have implemented. I would like to try and combine a self organising map and a multilayer perceptron. I have used your network to cluster character images. Is there any way to save the clustering so I can feed it as input to a multilayer perceptron?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-14033379414527082342017-02-07T08:49:27.711+00:002017-02-07T08:49:27.711+00:00You first need to parse the data. I recommend you ...You first need to parse the data. I recommend you to look into pandas.JustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-28060481158602086772017-02-07T08:25:15.834+00:002017-02-07T08:25:15.834+00:00How would this work if we had to feed bulk data in...How would this work if we had to feed bulk data in csv or txt format?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-80596563788272187542017-02-03T18:57:59.066+00:002017-02-03T18:57:59.066+00:00Hi, look at the documentation of the method win_ma...Hi, look at the documentation of the method win_map, I'm sure that will answer your question.JustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-20271444465868504572017-02-03T17:29:42.092+00:002017-02-03T17:29:42.092+00:00But how can I count the amount of samples in one p...But how can I count the amount of samples in one position?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-87428165015386992112017-02-03T17:20:21.768+00:002017-02-03T17:20:21.768+00:00Nevermind! Got it! Thanks a lot! :-)Nevermind! Got it! Thanks a lot! :-)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-91368980292962306132017-02-03T14:31:51.941+00:002017-02-03T14:31:51.941+00:00Thank you so much for providing the code. I hope y...Thank you so much for providing the code. I hope you can help me with my question. I thought that it is possible to apply SOM for outlier detection in an unsupervised manner (without labeled data). In the iris dataset the data has labels right:<br /><br />t = zeros(len(target),dtype=int)<br />t[target == 'setosa'] = 0<br />t[target == 'versicolor'] = 1<br />t[target == 'virginica'] = 2<br /><br />If I just have numerical data without any labels, how can I use your SOM approach?<br /><br />Thank you very, very much for your help! I really appreciate it! :-)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-82656609983356608212017-01-25T14:45:10.117+00:002017-01-25T14:45:10.117+00:00Hi Javier, given your two questions I'd recomm...Hi Javier, given your two questions I'd recommend you to check http://scikit-learn.org/stable/modules/generated/sklearn.linear_model.LinearRegression.html<br /><br />This takes care of the "ones" and the prediction for you. JustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-46861173103489256742017-01-25T12:02:02.942+00:002017-01-25T12:02:02.942+00:00Just one more,... how to predict the new data set ...Just one more,... how to predict the new data set with my new set of points? Y use Xtrain and Y train, the model W=inv(Xtrain.T*Xtrain)*Xtrain.T*Ytrain , with np.dot, of course... so when predicting y use Ypred = Xvalid*W, ... but it's not working to me :(Javier Lazarohttp://www.blogger.com/profile/09355965255599164055noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-21764624638978259082017-01-25T11:58:24.635+00:002017-01-25T11:58:24.635+00:00Is it necessary to add "ones(9)"? I usua...Is it necessary to add "ones(9)"? I usually have just the independent variable x, and the dependent one y,... I don't know how, why and when should I add ones column to my independent var (x). regardsJavier Lazarohttp://www.blogger.com/profile/09355965255599164055noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-71495638641747193392017-01-03T18:11:04.142+00:002017-01-03T18:11:04.142+00:00Hi again,
I'll try to answer our questions on...Hi again,<br /><br />I'll try to answer our questions one by one.<br /><br />- If your samples represent digits, you can associate a cell in the map with a digit. See this example https://github.com/JustGlowing/minisom/blob/master/examples/example_digits.py<br /><br />- If two samples have the same winning neuron, it means that the two samples are similar.<br /><br />- With the training and initialization methods implemented, It's normal that some areas don't have winning neurons for the samples used for training, especially between regions that activate for samples that have different.JustGlowinghttp://www.blogger.com/profile/17212021288715206641noreply@blogger.comtag:blogger.com,1999:blog-1693014329567144872.post-2754512026833102642017-01-03T17:41:49.471+00:002017-01-03T17:41:49.471+00:00Hi, thank for answer my question. I have a doubt. ...Hi, thank for answer my question. I have a doubt. I was testing your code with the mnist data set, is similar to the digits dataset from python, but the difference is the size of the images. I trained the network SOM with a sample of 225 random digits and the dimension of my grid is 15*15. When I plot the U-matrix with the method distance_map, each coordinate of my plot should have a digit rigth? Why the position of my winning neuron is the same for different samples? There are empty positions in muy plot wuth any digits. When training the SOM with a larger sample there are empty positions too in muy plot. Should that happen? I use other implementation for example kohonen library from R package does not happen. Could you help me understand why this happens?. ThanksMayra Mercedes Zegarra Rodriguezhttp://www.blogger.com/profile/11468886665771713399noreply@blogger.com