For this assignment, you are implementing the k -Meansclustering algorithm in python. The command to run the
Question:
For this assignment, you are implementing the k-Meansclustering algorithm in python. The command to run the algorithmshould be as follows:
./yourprog values.txt k
where values.txt is a space-separated file which contains a setof 2D objects with numeric attributes and k is the numberof clusters you wish to find.
For example:
values.txt
12 32
43 25
178 234
32 49
156 200
values-output.txt
12 32 0
43 25 0
178 234 1
32 49 0
156 200 1
The output should be a space separated text file with the thirdcolumn having the discovered cluster index for each data object.There should be no output to console.
Please do not import a library which already hask-Means implemented. This has happened in thepast by students using scikit.learn and finding thek-Means implementation in there. The objective of thisassignment is to get practice on the machinery of k-Meansand have some programming practice in the process; not to analyzedata.
Edit : code should be in python for k-meanclustering algorithm. Cant use libraries like scikit.learn
Corporate Finance
ISBN: 978-0077861759
10th edition
Authors: Stephen Ross, Randolph Westerfield, Jeffrey Jaffe