Question: Please, writing K-Means++ Clustering with C++ (oop) programming. Read to 20.txt file. 12944.330389 19522.690462 23487.769950 14749.226168 31004.306839 21458.349354 49728.492698 17946.318136 18262.371247 34230.973732 27200.416014 29683.344889 32659.905655

Please, writing K-Means++ Clustering with C++ (oop) programming. Read to 20.txt file.
12944.330389 19522.690462 23487.769950 14749.226168 31004.306839 21458.349354 49728.492698 17946.318136 18262.371247 34230.973732 27200.416014 29683.344889 32659.905655 31322.779442 42235.109422 32882.346795 19237.531679 39507.847120 30240.587168 38106.082073 35623.768986 38814.054724 44607.978078 38388.838796 21747.098038 44784.848319 28875.463979 47422.816531 32361.143193 45963.285683 42755.672541 42966.140950 12890.344693 52475.699722 25061.003075 51526.124012 31592.466525 49745.987221 36010.099570 49567.603065
for 50.txt file
7002.570551 5890.825277 15087.234678 25628.060733 21824.489021 22370.809834 23306.885670 17234.170030 24497.000000 6163.084873 25934.538318 23294.776340 32973.962633 20675.530140 40450.302845 23378.281609 49600.066292 18478.226535 57531.977457 12129.281533 13459.804810 35186.121155 19505.231435 33808.596149 23528.215710 34179.178280 26858.660634 28875.880759 29091.812153 29736.837188 31163.117912 31878.412162 34669.786382 29042.120136 37137.959283 33280.981813 41221.018454 32458.500410 49664.239750 33372.913819 14549.902502 38899.610360 18009.765398 39861.621653 23321.339265 39184.353305 29032.989978 39301.521848 32214.439408 37389.333240 33413.770303 39660.806132 36559.845586 38297.223036 38864.884786 38349.840424 43329.062842 38591.718704 49688.457629 37919.079574 15926.819268 47268.705470 22886.518295 44124.767862 24497.000000 45582.418602 26359.884828 47416.088415 30212.928839 47571.164924 30866.936110 46491.285062 32664.413086 44742.142657 33296.805256 46043.414743 38531.422145 42755.564517 47113.723122 42772.355497 4298.077829 53810.573164 9853.663445 53494.957481 18269.563629 51599.864926 22730.430795 51878.741572 29073.101107 50754.246295 31341.876325 48534.328606 31702.000000 51623.370107 33313.432484 48549.677892 35148.060128 50260.264216 38031.087780 49339.724064
In this project, you will implement a class hierarchy to cluster post offices of Sidney city. Since clustering data is an unsupervised machine learning task, you will implement one of the K-Means, K- Medoids, mean shift, or spectral clustering approaches. In the class design, you must have five classes: Node, Edge, Graph, Clustering (base class), and one of the K-Means++, K-Medoids, mean shift, or spectral clustering. Node class will be used to store x and y coordinates of a post office as well as the identity, which can be a string or an integer depending on your design, of a node. You will have two text files (20.txt and 50.txt) for the x and y coordinates of the post offices. Clustering class is a base class for clustering and includes base functionalities for clustering tasks such as reading data from the file and printing the clustering result on the terminal screen. In the results, for each cluster, you have to display the identities of nodes that belong to a cluster. K-Means++, K-Medoids, mean shift, or spectral clustering class inherits from the Clustering class and includes only functionalities for that specific machine learning approaches. For example, K-Means++ must have a member function to determine the farthest points in the initialization step. Spectral clustering must have a member function to calculate the affine matrix of the nodes. Edge class will be used to store the nodes of the edge, an identity, and the edge's weight. The weight will be the distance between these two nodes. Graph class will be used to store the graph. You have to construct a graph for each cluster. The nodes of the graph will be items of a cluster, and to determine the edges that connect nodes employ minimum spanning tree algorithms such as Prim or Kruskal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
