Skip to content

Instantly share code, notes, and snippets.

@bvarghese1
Created April 14, 2019 20:11
Show Gist options
  • Save bvarghese1/110eb86dbe4bff20f00908e352e561c8 to your computer and use it in GitHub Desktop.
Save bvarghese1/110eb86dbe4bff20f00908e352e561c8 to your computer and use it in GitHub Desktop.
from sklearn.cluster import KmeansClustering
from cluster_template import ClusterTemplate
class KmeansCluster(ClusterTemplate):
def __init__(self, path):
super(KmeansCluster, self).__init__(path)
# Implementation of abstract method
def init_cluster_algo(self, num_clusters):
self.clustering_algo = KmeansClustering(nclusters=num_clusters)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment