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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started