Skip to content
Snippets Groups Projects
Commit aa15792f authored by Alexandre Passos's avatar Alexandre Passos
Browse files

Using a smaller example to speed things up

parent 2eff92e8
Branches
Tags
No related merge requests found
...@@ -13,7 +13,7 @@ import itertools ...@@ -13,7 +13,7 @@ import itertools
import pylab as pl import pylab as pl
import matplotlib as mpl import matplotlib as mpl
n, m = 300, 2 n, m = 200, 2
# generate random sample, two components # generate random sample, two components
np.random.seed(0) np.random.seed(0)
...@@ -22,7 +22,7 @@ X = np.r_[np.dot(np.random.randn(n, 2), C), ...@@ -22,7 +22,7 @@ X = np.r_[np.dot(np.random.randn(n, 2), C),
np.random.randn(n, 2) + np.array([3, 3])] np.random.randn(n, 2) + np.array([3, 3])]
for p,alpha in enumerate([0.01, 1., 100.]): for p,alpha in enumerate([0.01, 1., 100.]):
clf = mixture.DPGMM(n_states=10, cvtype='full', alpha=alpha) clf = mixture.DPGMM(n_states=5, cvtype='full', alpha=alpha)
clf.fit(X) clf.fit(X)
splot = pl.subplot(310+p+1, aspect='equal') splot = pl.subplot(310+p+1, aspect='equal')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment