A simple implementation for clustering methods such as k-means, EM algorithm, ...