File tree Expand file tree Collapse file tree 5 files changed +7
-64
lines changed
imblearn/under_sampling/_prototype_selection/tests Expand file tree Collapse file tree 5 files changed +7
-64
lines changed Original file line number Diff line number Diff line change 44
55.. _scikit-learn-contrib : https://github.com/scikit-learn-contrib
66
7- |Azure |_ |Travis |_ |AppVeyor |_ | Codecov |_ |CircleCI |_ |PythonVersion |_ |Pypi |_ |Gitter |_
7+ |Azure |_ |Travis |_ |Codecov |_ |CircleCI |_ |PythonVersion |_ |Pypi |_ |Gitter |_
88
99.. |Azure | image :: https://dev.azure.com/imbalanced-learn/imbalanced-learn/_apis/build/status/scikit-learn-contrib.imbalanced-learn?branchName=master
1010.. _Azure : https://dev.azure.com/imbalanced-learn/imbalanced-learn/_build
1111
1212.. |Travis | image :: https://travis-ci.org/scikit-learn-contrib/imbalanced-learn.svg?branch=master
1313.. _Travis : https://travis-ci.org/scikit-learn-contrib/imbalanced-learn
1414
15- .. |AppVeyor | image :: https://ci.appveyor.com/api/projects/status/c8w4xb7re4euntvi/branch/master?svg=true
16- .. _AppVeyor : https://ci.appveyor.com/project/glemaitre/imbalanced-learn/history
17-
1815.. |Codecov | image :: https://codecov.io/gh/scikit-learn-contrib/imbalanced-learn/branch/master/graph/badge.svg
1916.. _Codecov : https://codecov.io/gh/scikit-learn-contrib/imbalanced-learn
2017
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -73,15 +73,13 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then
7373 sudo apt-get install python3-scipy libatlas3-base libatlas-base-dev libatlas-dev python3-virtualenv git
7474 python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV
7575 source $VIRTUALENV /bin/activate
76- python -m pip install pandas
7776 python -m pip install pytest==$PYTEST_VERSION pytest-cov joblib cython
7877 python -m pip install git+https://github.com/scikit-learn/scikit-learn.git
7978elif [[ " $DISTRIB " == " ubuntu-32" ]]; then
8079 apt-get update
8180 apt-get install -y python3-dev python3-scipy libatlas3-base libatlas-base-dev libatlas-dev python3-virtualenv git
8281 python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV
8382 source $VIRTUALENV /bin/activate
84- python -m pip install pandas
8583 python -m pip install pytest==$PYTEST_VERSION pytest-cov joblib cython
8684 python -m pip install git+https://github.com/scikit-learn/scikit-learn.git
8785elif [[ " $DISTRIB " == " conda-pip-latest" ]]; then
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ a boosting iteration :cite:`seiffert2009rusboost`::
9797 RUSBoostClassifier(...)
9898 >>> y_pred = rusboost.predict(X_test)
9999 >>> balanced_accuracy_score(y_test, y_pred) # doctest: +ELLIPSIS
100- 0.6 ...
100+ 0.4 ...
101101
102102A specific method which uses ``AdaBoost `` as learners in the bagging classifier
103103is called EasyEnsemble. The :class: `EasyEnsembleClassifier ` allows to bag
Original file line number Diff line number Diff line change 99
1010from sklearn .ensemble import GradientBoostingClassifier
1111from sklearn .ensemble import RandomForestClassifier
12+ from sklearn .naive_bayes import GaussianNB as NB
1213from sklearn .utils ._testing import assert_array_equal
1314
1415from imblearn .under_sampling import InstanceHardnessThreshold
@@ -55,13 +56,13 @@ def test_iht_fit_resample():
5556
5657
5758def test_iht_fit_resample_half ():
58- sampling_strategy = {0 : 6 , 1 : 8 }
59+ sampling_strategy = {0 : 3 , 1 : 3 }
5960 iht = InstanceHardnessThreshold (
60- ESTIMATOR , sampling_strategy = sampling_strategy , random_state = RND_SEED
61+ NB () , sampling_strategy = sampling_strategy , random_state = RND_SEED
6162 )
6263 X_resampled , y_resampled = iht .fit_resample (X , Y )
63- assert X_resampled .shape == (14 , 2 )
64- assert y_resampled .shape == (14 ,)
64+ assert X_resampled .shape == (6 , 2 )
65+ assert y_resampled .shape == (6 ,)
6566
6667
6768def test_iht_fit_resample_class_obj ():
You can’t perform that action at this time.
0 commit comments