Skip to content

Commit 6fb6c63

Browse files
committed
Modification of the ignore_warning function and _IgnoreWarning class.
1 parent 0625e03 commit 6fb6c63

File tree

5 files changed

+424
-344
lines changed

5 files changed

+424
-344
lines changed

doc/whats_new.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,12 @@ Enhancements
131131
- Add option to show ``indicator features`` in the output of Imputer.
132132
By `Mani Teja`_.
133133

134-
- Reduce the memory usage for 32-bit float input arrays of :func:`utils.mean_variance_axis` and
134+
- Reduce the memory usage for 32-bit float input arrays of :func:`utils.mean_variance_axis` and
135135
:func:`utils.incr_mean_variance_axis` by supporting cython fused types. By `YenChen Lin`_.
136136

137+
- The :func: `ignore_warnings` now accept a category argument to ignore only
138+
the warnings of a specified type. By `Thierry Guillemot`_.
139+
137140
Bug fixes
138141
.........
139142

@@ -201,6 +204,12 @@ API changes summary
201204
- Access to public attributes ``.X_`` and ``.y_`` has been deprecated in
202205
:class:`isotonic.IsotonicRegression`. By `Jonathan Arfa`_.
203206

207+
- The old :class:`GMM` is deprecated in favor of the new
208+
:class:`GaussianMixture`. The new class compute the Gaussian mixture
209+
faster than before and some of computationnal problems have been solved.
210+
By `Wei Xue`_ and `Thierry Guillemot`_.
211+
212+
204213

205214
.. _changes_0_17_1:
206215

@@ -4151,3 +4160,7 @@ David Huard, Dave Morrill, Ed Schofield, Travis Oliphant, Pearu Peterson.
41514160
.. _JPFrancoia: https://github.com/JPFrancoia
41524161

41534162
.. _Mani Teja: https://github.com/maniteja123
4163+
4164+
.. _Thierry Guillemot: https://github.com/tguillemot
4165+
4166+
.. _Wei Xue: https://github.com/xuewei4d

sklearn/mixture/gaussian_mixture.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def _estimate_gaussian_parameters(X, resp, reg_covar, covariance_type):
279279
"diag": _estimate_gaussian_covariance_diag,
280280
"spherical": _estimate_gaussian_covariance_spherical}
281281

282-
nk = resp.sum(axis=0) + 10 * np.finfo(float).eps
282+
nk = resp.sum(axis=0) + 10 * np.finfo(resp.dtype).eps
283283
means = np.dot(resp.T, X) / nk[:, np.newaxis]
284284
covariances = compute_covariance[covariance_type](
285285
resp, X, nk, means, reg_covar)

0 commit comments

Comments
 (0)