Optimization-Based Data Clustering Algorithm