Refactored calling k-means algorithm to its own function.
Must cast dataset as matrix for k-means algorithm.