From 631e250f54db3abfc42dc264759209d6c7b0ef68 Mon Sep 17 00:00:00 2001 From: Johannes Hansen Date: Tue, 22 May 2018 22:10:10 +0100 Subject: [PATCH 1/2] add entry for KMeans sample weight support --- doc/whats_new/v0.20.rst | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/doc/whats_new/v0.20.rst b/doc/whats_new/v0.20.rst index 122317c300209..b3708b80f594e 100644 --- a/doc/whats_new/v0.20.rst +++ b/doc/whats_new/v0.20.rst @@ -111,6 +111,9 @@ Decomposition, manifold learning and clustering - :class:`cluster.AgglomerativeClustering` now supports Single Linkage clustering via ``linkage='single'``. :issue:`9372` by :user:`Leland McInnes ` and :user:`Steve Astels `. +- :class:`cluster.KMeans` and :class:`cluster.MiniBatchKMeans` now support + sample weights via new parameter ``sample_weight`` in ``fit`` function. + :issue:`10933` by :user:`Johannes Hansen `. Metrics @@ -160,7 +163,7 @@ Classifiers and regressors :class:`neighbors.RadiusNeighborsClassifier` are now parallelized according to ``n_jobs`` regardless of ``algorithm``. :issue:`8003` by :user:`Joël Billaud `. - + - Memory usage improvement for :func:`_class_means` and :func:`_class_cov` in :class:`discriminant_analysis`. :issue:`10898` by :user:`Nanxin Chen `.` @@ -190,7 +193,7 @@ Preprocessing - :class:`preprocessing.PolynomialFeatures` now supports sparse input. :issue:`10452` by :user:`Aman Dalmia ` and `Joel Nothman`_. - + - Enable the call to :meth:`get_feature_names` in unfitted :class:`feature_extraction.text.CountVectorizer` initialized with a vocabulary. :issue:`10908` by :user:`Mohamed Maskani `. @@ -611,3 +614,8 @@ Changes to estimator checks - Add tests in :func:`estimator_checks.check_estimator` to check that an estimator can handle read-only memmap input data. :issue:`10663` by :user:`Arthur Mensch ` and :user:`Loïc Estève `. + +- :func:`estimator_checks.check_sample_weights_pandas_series` now uses 8 rather + than 6 samples to accommodate for the default number of clusters in + :class:`cluster.KMeans`. + :issue:`10933` by :user:`Johannes Hansen `. From 073ec3f8e4a85c61542ba0686d59592ab313a490 Mon Sep 17 00:00:00 2001 From: Johannes Hansen Date: Wed, 23 May 2018 07:11:36 +0100 Subject: [PATCH 2/2] blank line --- doc/whats_new/v0.20.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/whats_new/v0.20.rst b/doc/whats_new/v0.20.rst index b3708b80f594e..ef6f065bdd3c2 100644 --- a/doc/whats_new/v0.20.rst +++ b/doc/whats_new/v0.20.rst @@ -111,6 +111,7 @@ Decomposition, manifold learning and clustering - :class:`cluster.AgglomerativeClustering` now supports Single Linkage clustering via ``linkage='single'``. :issue:`9372` by :user:`Leland McInnes ` and :user:`Steve Astels `. + - :class:`cluster.KMeans` and :class:`cluster.MiniBatchKMeans` now support sample weights via new parameter ``sample_weight`` in ``fit`` function. :issue:`10933` by :user:`Johannes Hansen `.