Skip to content

Instantly share code, notes, and snippets.

@orcaman
Created July 21, 2019 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orcaman/15db9826a8b352086945d9073ebb43a7 to your computer and use it in GitHub Desktop.
Save orcaman/15db9826a8b352086945d9073ebb43a7 to your computer and use it in GitHub Desktop.
find_components.py
n_components = np.arange(5, 30, 5)
models = [GaussianMixture(n, covariance_type='full', random_state=0)
for n in n_components]
aics = [model.fit(data).aic(data) for model in models]
plt.plot(n_components, aics)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment