<p dir="auto">Sampling using the sample() function does not work for DPGMM (Dirichlet Process Gaussian Mixture Mode) and VBGMM (Variational inference for a Gaussian mixture model )</p>
<pre class="notranslate">    398                     cv = self.covars_[comp][0]
    399                 else:
--&gt; 400                     cv = self.covars_[comp]
    401                 X[comp_in_X] = sample_gaussian(
    402                     self.means_[comp], cv, self.covariance_type,

AttributeError: 'VBGMM' object has no attribute 'covars_'
</pre>
<p dir="auto">Likely related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="10425493" data-permission-text="Title is private" data-url="https://github.com/scikit-learn/scikit-learn/issues/1637" data-hovercard-type="issue" data-hovercard-url="/scikit-learn/scikit-learn/issues/1637/hovercard" href="https://github.com/scikit-learn/scikit-learn/issues/1637">#1637</a>, but that activity has been over a year ago.</p>
<p dir="auto">is there a potential workaround?</p>
<p dir="auto">Hi Guys -</p>
<p dir="auto">Trying out DPGMM to see if I can get a more stable solution.  Things look good so far except for one problem.</p>
<p dir="auto">The sample() method does not work for dpgmm.  The primary reason is that sample() assumes there is a self.covars_, but this does not exist.</p>
<p dir="auto">There is a secondary problem however.  I tried using <em>get_covars to set the covars</em> but these covariances are not correct, perhaps because of a different convention somehow in the definitions of these covariances.</p>
<p dir="auto">best, and thanks for the good work on sklearn,<br>
-e</p>