Using K-Means clustering, with feature extraction comparison between centroid and chaincode methods.. The script implements K-Means clustering from scratch, performs feature extraction using both centroid and chaincode techniques, evaluates classification accuracy, and compares the effectiveness of the two feature extraction methods.
Retrieves the MNIST dataset containing images of handwritten digits along with their corresponding labels.
Computes centroids for each image. Uses centroid coordinates as features for clustering.
Implements K-Means clustering algorithm without relying on built-in functions. Clusters the data based on the extracted centroid features.
Assigns cluster labels to each image and evaluates classification accuracy. Computes accuracy metric to assess the performance of K-Means clustering with centroid feature extraction.
Computes chaincode for each image block. Utilizes chaincode features for clustering.
Applies K-Means clustering using chaincode features.
Assigns cluster labels to images based on chaincode features and evaluates accuracy. Computes accuracy metric to compare with the centroid method.
Analyzes and compares the accuracy achieved with centroid and chaincode feature extraction. Determines which feature extraction method yields better performance with K-Means clustering.