AI department for a company that is manufacturing T-shirts. the data collection team gathered information about N persons. For each person they got 5 features:
- The Height
- The Weight
- The body mass index
- The length between the shoulders
- The length of the arms
the data shaped as an Nx5 matrix.this code will cluster the data into K clusters to manufacture K sizes of the T-shirt.For example, if the K= 3 then the N samples is clustered into 3 sizes; small, medium and large.If the K=5 then the data is clustered into XS, S, M, L and XL.
K-mean clustering algorithm to cluster the normalized normalized N samples into K groups. there is redundancy in the features; they can reduced and still preserve the same information.Principle Component Analysis (PCA) is used to reduce the features from 5 dimensions to 2.
#How to run the code
**run main.py K=5 for example the graph of the running time vs the number of samples N
**run main2.py
the percentage of each cluster from the total N samples for k=5 { green => 16.946 cyan => 17.785 magenta => 21.606 orange => 24.731 black => 18.932 }