MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / make_clusters

Function make_clusters

examples/gaussian_mixture.py:12–18  ·  view source on GitHub ↗
(skew=True, *arg, **kwargs)

Source from the content-addressed store, hash-verified

10
11
12def make_clusters(skew=True, *arg, **kwargs):
13 X, y = datasets.make_blobs(*arg, **kwargs)
14 if skew:
15 nrow = X.shape[1]
16 for i in np.unique(y):
17 X[y == i] = X[y == i].dot(np.random.random((nrow, nrow)) - 0.5)
18 return X, y
19
20
21def KMeans_and_GMM(K):

Callers 1

KMeans_and_GMMFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected