Soft and Hard K-Means Alogrithm