File tree 5 files changed +7
-64
lines changed
imblearn/under_sampling/_prototype_selection/tests
5 files changed +7
-64
lines changed Original file line number Diff line number Diff line change 4
4
5
5
.. _scikit-learn-contrib : https://github.com/scikit-learn-contrib
6
6
7
- |Azure |_ |Travis |_ |AppVeyor |_ | Codecov |_ |CircleCI |_ |PythonVersion |_ |Pypi |_ |Gitter |_
7
+ |Azure |_ |Travis |_ |Codecov |_ |CircleCI |_ |PythonVersion |_ |Pypi |_ |Gitter |_
8
8
9
9
.. |Azure | image :: https://dev.azure.com/imbalanced-learn/imbalanced-learn/_apis/build/status/scikit-learn-contrib.imbalanced-learn?branchName=master
10
10
.. _Azure : https://dev.azure.com/imbalanced-learn/imbalanced-learn/_build
11
11
12
12
.. |Travis | image :: https://travis-ci.org/scikit-learn-contrib/imbalanced-learn.svg?branch=master
13
13
.. _Travis : https://travis-ci.org/scikit-learn-contrib/imbalanced-learn
14
14
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
-
18
15
.. |Codecov | image :: https://codecov.io/gh/scikit-learn-contrib/imbalanced-learn/branch/master/graph/badge.svg
19
16
.. _Codecov : https://codecov.io/gh/scikit-learn-contrib/imbalanced-learn
20
17
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -73,15 +73,13 @@ elif [[ "$DISTRIB" == "ubuntu" ]]; then
73
73
sudo apt-get install python3-scipy libatlas3-base libatlas-base-dev libatlas-dev python3-virtualenv git
74
74
python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV
75
75
source $VIRTUALENV /bin/activate
76
- python -m pip install pandas
77
76
python -m pip install pytest==$PYTEST_VERSION pytest-cov joblib cython
78
77
python -m pip install git+https://github.com/scikit-learn/scikit-learn.git
79
78
elif [[ " $DISTRIB " == " ubuntu-32" ]]; then
80
79
apt-get update
81
80
apt-get install -y python3-dev python3-scipy libatlas3-base libatlas-base-dev libatlas-dev python3-virtualenv git
82
81
python3 -m virtualenv --system-site-packages --python=python3 $VIRTUALENV
83
82
source $VIRTUALENV /bin/activate
84
- python -m pip install pandas
85
83
python -m pip install pytest==$PYTEST_VERSION pytest-cov joblib cython
86
84
python -m pip install git+https://github.com/scikit-learn/scikit-learn.git
87
85
elif [[ " $DISTRIB " == " conda-pip-latest" ]]; then
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ a boosting iteration :cite:`seiffert2009rusboost`::
97
97
RUSBoostClassifier(...)
98
98
>>> y_pred = rusboost.predict(X_test)
99
99
>>> balanced_accuracy_score(y_test, y_pred) # doctest: +ELLIPSIS
100
- 0.6 ...
100
+ 0.4 ...
101
101
102
102
A specific method which uses ``AdaBoost `` as learners in the bagging classifier
103
103
is called EasyEnsemble. The :class: `EasyEnsembleClassifier ` allows to bag
Original file line number Diff line number Diff line change 9
9
10
10
from sklearn .ensemble import GradientBoostingClassifier
11
11
from sklearn .ensemble import RandomForestClassifier
12
+ from sklearn .naive_bayes import GaussianNB as NB
12
13
from sklearn .utils ._testing import assert_array_equal
13
14
14
15
from imblearn .under_sampling import InstanceHardnessThreshold
@@ -55,13 +56,13 @@ def test_iht_fit_resample():
55
56
56
57
57
58
def test_iht_fit_resample_half ():
58
- sampling_strategy = {0 : 6 , 1 : 8 }
59
+ sampling_strategy = {0 : 3 , 1 : 3 }
59
60
iht = InstanceHardnessThreshold (
60
- ESTIMATOR , sampling_strategy = sampling_strategy , random_state = RND_SEED
61
+ NB () , sampling_strategy = sampling_strategy , random_state = RND_SEED
61
62
)
62
63
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 ,)
65
66
66
67
67
68
def test_iht_fit_resample_class_obj ():
You can’t perform that action at this time.
0 commit comments