tag:blogger.com,1999:blog-8183154932516295815.post6996798543469141013..comments2024-03-23T10:30:15.029+05:30Comments on OpenCV-Python: K-Means Clustering - 2 : Working with Scipyabidkhttp://www.blogger.com/profile/02551137580063586047noreply@blogger.comBlogger12125tag:blogger.com,1999:blog-8183154932516295815.post-87340557292413809012013-04-08T01:08:30.561+05:302013-04-08T01:08:30.561+05:30Ooops I didn't notice the hstack vs vstack tha...Ooops I didn't notice the hstack vs vstack thanks Abid !!Tottihttps://www.blogger.com/profile/16668543191533182657noreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-86619234795837950352013-04-08T00:00:47.659+05:302013-04-08T00:00:47.659+05:30No, np.vstack stacks two arrays vertically. ie res...No, np.vstack stacks two arrays vertically. ie result is a 50x2 array. To understand that, open python shell and execute each line. Check shape of each output. Then you will get it.abidkhttps://www.blogger.com/profile/02551137580063586047noreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-62581625079499886362013-04-07T22:34:19.638+05:302013-04-07T22:34:19.638+05:30You're right but then the next line
z = np.vst...You're right but then the next line<br />z = np.vstack((x,y)) <br />will combine the two matrices and create a 50x4 matrix while we need actually 50x2 like you said for two features.<br />Correct me if I'm wrong ? :)Tottihttps://www.blogger.com/profile/16668543191533182657noreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-55073829433201930432013-04-07T16:56:20.217+05:302013-04-07T16:56:20.217+05:30Actually I need a single array with size 50x2. ie ...Actually I need a single array with size 50x2. ie 50 test data, first column corresponds to its height, second its weight. If it were one column, it is just one feature, ie height only. Similar one we did in section 1. abidkhttps://www.blogger.com/profile/02551137580063586047noreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-1171815710760482862013-04-07T03:54:52.597+05:302013-04-07T03:54:52.597+05:30Btw, I think the first two lines of code under sec...Btw, I think the first two lines of code under section 2:<br />>>> x = np.random.randint(25,50,(25,2))<br />>>> y = np.random.randint(60,85,(25,2))<br /><br />should be<br /><br />>>> x = np.random.randint(25,50,(25,1)) # <---- only 1 instead of 2 columns<br />>>> y = np.random.randint(60,85,(25,1)) # <---- only 1 instead of 2 columnsTottihttps://www.blogger.com/profile/16668543191533182657noreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-62351891929317878042013-04-06T22:27:33.433+05:302013-04-06T22:27:33.433+05:30Great post man.. I learn the tidbits of k-means an...Great post man.. I learn the tidbits of k-means and Scipy from this article.<br />Keep up the good work !<br /><br />T<br /><br />Tottihttp://iamtotti.comnoreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-64799538598592744902013-03-03T02:40:23.402+05:302013-03-03T02:40:23.402+05:30Thanks.
Clear, interesting and useful.
Good work!...Thanks.<br />Clear, interesting and useful.<br /><br />Good work!Unknownhttps://www.blogger.com/profile/03697551817261218766noreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-19330902249160253722013-01-27T01:20:46.488+05:302013-01-27T01:20:46.488+05:30Really helpful. I can't wait for the OpenCV ex...Really helpful. I can't wait for the OpenCV example a that's what I'm struggling with at the moment!Jamie Bullhttps://www.blogger.com/profile/18320993123584137767noreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-62157406104495323092013-01-21T09:20:03.303+05:302013-01-21T09:20:03.303+05:30Great blog! Timely as I just started studying k me...Great blog! Timely as I just started studying k means clustering!Anonymoushttps://www.blogger.com/profile/13030016457308934879noreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-6585560612597728682013-01-07T20:48:59.887+05:302013-01-07T20:48:59.887+05:30Ekka Kalaki ... :D super Blog ... nalla asala expl...Ekka Kalaki ... :D super Blog ... nalla asala explanation .. Thakarthi wirelesshttps://www.blogger.com/profile/07912806317835826752noreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-66702177589183470732012-12-29T20:04:50.209+05:302012-12-29T20:04:50.209+05:30I am sorry, I didn't get your question. May be...I am sorry, I didn't get your question. May be you can mail me with more details on abidrahman2@gmail.comabidkhttps://www.blogger.com/profile/02551137580063586047noreply@blogger.comtag:blogger.com,1999:blog-8183154932516295815.post-5101751946772629722012-12-29T19:05:08.313+05:302012-12-29T19:05:08.313+05:30It is fun to read your article - how you in pract...It is fun to read your article - how you in practicle manner explains how to use kMeansThorhttps://www.blogger.com/profile/00616641282249791635noreply@blogger.com