MCPcopy Create free account
hub / github.com/lazyprogrammer/machine_learning_examples / main

Function main

unsupervised_class/gmm_mnist.py:25–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24
25def main():
26 X, Y = get_data(10000)
27 print("Number of data points:", len(Y))
28
29 model = GaussianMixture(n_components=10)
30 model.fit(X)
31 M = model.means_
32 R = model.predict_proba(X)
33
34 print("Purity:", purity(Y, R)) # max is 1, higher is better
35 print("DBI:", DBI(X, M, R)) # lower is better
36
37
38if __name__ == "__main__":

Callers 1

gmm_mnist.pyFile · 0.70

Calls 5

get_dataFunction · 0.90
purityFunction · 0.90
DBIFunction · 0.90
fitMethod · 0.45
predict_probaMethod · 0.45

Tested by

no test coverage detected