Question: implement K-means and LVQ in whatever language; python, java, c++,etc. preferably in python Generate random data in the region of the plane from -10 to

implement K-means and LVQ in whatever language; python, java, c++,etc. preferably in python

Generate random data in the region of the plane from -10 to 10 on both axes. (The rectangle with corners (-10, 10), (-10, -10), (10, -10), and (10, 10).

Use 80% of your data for training and 20% for testing.

Run K-means with 4 categories. Center them around the middle of the four quadrants: (5, 5), (5,-5), (-5,5), (-5,-5).

Run K-means again with 6 categories. Add in a mean on the axes: (0,5) and (0, -5).

Note how much of your data is categorized into each category using both K=4 and K=6. Give data on where your means end up.

Run LVQ on the data using 6 evenly-spaced categories. The positive half of the plane should be categories A, B, and C (from left to right), while the lower half of the plane should be the same categories in reverse order: C, B, and A.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!