Renamed train() method to cluster(). Added optional constructor parameter to accept centroids.