Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] EHN add voting paramter for ClusterCentroids #318

Merged
merged 30 commits into from
Aug 24, 2017
Merged
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a68e8eb
EHN POC sparse handling for RandomUnderSampler
glemaitre Aug 12, 2017
0062d6d
EHN support sparse ENN
glemaitre Aug 12, 2017
6197d80
iter
glemaitre Aug 12, 2017
f669843
EHN sparse indexing IHT
glemaitre Aug 12, 2017
4adc6db
EHN sparse support nearmiss
glemaitre Aug 12, 2017
9c93dab
Merge branch 'master' into is/158
glemaitre Aug 13, 2017
bba7835
EHN support sparse matrices for NCR
glemaitre Aug 13, 2017
9cd917b
EHN support sparse Tomek and OSS
glemaitre Aug 13, 2017
c3ba307
EHN support sparsity for CNN
glemaitre Aug 13, 2017
d195868
EHN support sparse for SMOTE
glemaitre Aug 13, 2017
bcf44ab
EHN support sparse adasyn
glemaitre Aug 13, 2017
c405aa9
EHN support sparsity for sombine methods
glemaitre Aug 13, 2017
79637d7
EHN support sparsity BC
glemaitre Aug 13, 2017
c199af9
DOC update docstring
glemaitre Aug 14, 2017
425928f
DOC fix example topic classification
glemaitre Aug 14, 2017
4ba8c4e
FIX fix test and class clustercentroids
glemaitre Aug 14, 2017
8298fdc
TST add common test
glemaitre Aug 14, 2017
e4c6ebb
TST add ensemble
glemaitre Aug 14, 2017
1226a91
TST use allclose
glemaitre Aug 14, 2017
68b16b5
TST install conda with ubuntu container
glemaitre Aug 14, 2017
35c638b
TST increase tolerance
glemaitre Aug 14, 2017
004f920
TST increase tolerance
glemaitre Aug 14, 2017
d3ceb5a
TST test all versions NearMiss and SMOTE
glemaitre Aug 14, 2017
d9c4e55
TST set the algorithm of KMeans
glemaitre Aug 14, 2017
b469747
DOC add entry in user guide
glemaitre Aug 14, 2017
c05d0ba
DOC add entry sparse for CC
glemaitre Aug 14, 2017
1625879
DOC whatsnew entry
glemaitre Aug 14, 2017
72a605d
EHN add voting paramter for ClusterCentroids
glemaitre Aug 14, 2017
e1ffb13
TST fix common test fixing voting
glemaitre Aug 14, 2017
6c34e56
Merge remote-tracking branch 'origin/master' into is/317
glemaitre Aug 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST set the algorithm of KMeans
  • Loading branch information
glemaitre committed Aug 14, 2017
commit d9c4e555939a778ae7fb8d8c5ee937ae53b3a139
6 changes: 6 additions & 0 deletions imblearn/utils/estimator_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from scipy import sparse

from sklearn.datasets import make_classification
from sklearn.cluster import KMeans
from sklearn.utils.estimator_checks import _yield_all_checks \
as sklearn_yield_all_checks, check_estimator \
as sklearn_check_estimator, check_parameters_default_constructible
Expand Down Expand Up @@ -275,6 +276,11 @@ def check_samplers_sparse(name, Sampler):
elif isinstance(Sampler(), NearMiss):
samplers = [Sampler(random_state=0, version=version)
for version in (1, 2, 3)]
elif isinstance(Sampler(), ClusterCentroids):
# set KMeans to full since it support sparse and dense
samplers = [Sampler(random_state=0,
estimator=KMeans(random_state=1,
algorithm='full'))]
else:
samplers = [Sampler(random_state=0)]
for sampler in samplers:
Expand Down