Question: java code group the received points, which reads 2-dimensional coordinates from a csv file, with k-means clustering. Here, the number of iterations and the number
java code
group the received points, which reads 2-dimensional coordinates from a csv file, with k-means clustering. Here, the number of iterations and the number of clusters (K) are taken from the user. Coordinates are read by selecting a csv file with select from file button. When the K-Means Clustering Button is pressed, classification is made and the color is graded according to the class number. Here, the value of K can be selected from 1 to 10. When the K-Means Clustering Button is re-pressed, the new values are sorted and color-coded based on the new values.
You are asked to create a screen that makes this classification.
1. You can define the colors as standard. You can define fixed colors based on the value of k and adjust the color accordingly. You can set the dimensions of the points to a standard size that will be shown on the screen.
2. These more points in the blue color show the Cluster Centers. You can make a color yourself.
3. You can create your gore random centers for screen size.
4. A sample csv file will be provided with the tutorial.
5. When a file other than CSV file is selected, it should fail and not be processed.
6. When the K-Means Clustering button is pressed when the inter- ference and K value are re-entered, new values must be calculated.
K-Means Clustering: Determine Random Center as the K value entered. Each point to be classified is included in that group if it is closer to this K center. In each iteration, the new center of the Group is calculated and the Centers are updated. Gore re-grouping is performed on new centers. When the group centers as far as the intervention is guided, coloring is done according to the grouping in the last case.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
