# Path: jubakit/wrapper/clustering.py
# class KMeans(BaseKFixedClustering):
# 
#   def _method(self):
#     return 'kmeans'
# 
# class GMM(BaseKFixedClustering):
# 
#   def _method(self):
#     return 'gmm'
# 
# class DBSCAN(BaseJubatusClustering):
# 
#   def __init__(self, eps=0.2, min_core_point=3,
#                bucket_size=100, compressed_bucket_size=100,
#                bicriteria_base_size=10, bucket_length=2,
#                forgetting_factor=0.0, forgetting_threshold=0.5,
#                seed=0, embedded=True, distance='euclidean'):
#     super(DBSCAN, self).__init__('simple', bucket_size,
#                                  compressed_bucket_size, bicriteria_base_size,
#                                  bucket_length, forgetting_factor,
#                                  forgetting_threshold, seed, embedded,
#                                  distance)
#     self.eps = eps
#     self.min_core_point = min_core_point
# 
#   def _launch_clustering(self):
#     self.method = 'dbscan'
#     self.parameter = {
#       'eps': self.eps,
#       'min_core_point': self.min_core_point
#     }
#     self.config_ = Config(method=self.method, parameter=self.parameter,
#                           compressor_method=self.compressor_method,
#                           compressor_parameter=self.compressor_parameter,
#                           distance=self.distance)
#     self.clustering_ = Clustering.run(config=self.config_,
#                                       embedded=self.embedded)


from sklearn.datasets import make_blobs
from jubakit.wrapper.clustering import KMeans, GMM, DBSCAN
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, print_function, unicode_literals

"""
Using Clustering
========================================

This is a simple example that illustrates Clustering service usage.

"""



# make blob dataset using sklearn API.
X, y = make_blobs(n_samples=200, centers=3, n_features=2, random_state=42)

# launch clustering instance
clusterings = [

# Path: jubakit/wrapper/clustering.py
# class KMeans(BaseKFixedClustering):
# 
#   def _method(self):
#     return 'kmeans'
# 
# class GMM(BaseKFixedClustering):
# 
#   def _method(self):
#     return 'gmm'
# 
# class DBSCAN(BaseJubatusClustering):
# 
#   def __init__(self, eps=0.2, min_core_point=3,
#                bucket_size=100, compressed_bucket_size=100,
#                bicriteria_base_size=10, bucket_length=2,
#                forgetting_factor=0.0, forgetting_threshold=0.5,
#                seed=0, embedded=True, distance='euclidean'):
#     super(DBSCAN, self).__init__('simple', bucket_size,
#                                  compressed_bucket_size, bicriteria_base_size,
#                                  bucket_length, forgetting_factor,
#                                  forgetting_threshold, seed, embedded,
#                                  distance)
#     self.eps = eps
#     self.min_core_point = min_core_point
# 
#   def _launch_clustering(self):
#     self.method = 'dbscan'
#     self.parameter = {
#       'eps': self.eps,
#       'min_core_point': self.min_core_point
#     }
#     self.config_ = Config(method=self.method, parameter=self.parameter,
#                           compressor_method=self.compressor_method,
#                           compressor_parameter=self.compressor_parameter,
#                           distance=self.distance)
#     self.clustering_ = Clustering.run(config=self.config_,
#                                       embedded=self.embedded)


# Path: example/clustering_sklearn_wrapper.py
from sklearn.datasets import make_blobs
from jubakit.wrapper.clustering import KMeans, GMM, DBSCAN

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from __future__ import absolute_import, division, print_function, unicode_literals

"""
Using Clustering
========================================

This is a simple example that illustrates Clustering service usage.

"""



# make blob dataset using sklearn API.
X, y = make_blobs(n_samples=200, centers=3, n_features=2, random_state=42)

# launch clustering instance
clusterings = [

    KMeans(k=3, bucket_size=200, embedded=False),