Skip to content

Conversation

@Prakhyath07
Copy link
Contributor

Reference Issue

What does this implement/fix? Explain your changes.

while using smapling strategy ="minority" we were getting error. i found issue in base.py of oversampler where in _parameter constraint majority was used in stroptions instead of minority

Any other comments?

updated majority to minority in str options: _parameter_constraints: dict = { "sampling_strategy": [ Interval(numbers.Real, 0, 1, closed="right"), StrOptions({"auto", "minority", "not minority", "not majority", "all"}), Mapping, callable, ], "random_state": ["random_state"], }
@codecov
Copy link

codecov bot commented Dec 23, 2022

Codecov Report

Base: 96.50% // Head: 94.25% // Decreases project coverage by -2.24% ⚠️

Coverage data is based on head (14c4a8b) compared to base (7cead9c).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@ Coverage Diff @@ ## master #964 +/- ## ========================================== - Coverage 96.50% 94.25% -2.25%  ========================================== Files 103 103 Lines 7264 7280 +16 Branches 1068 1071 +3 ========================================== - Hits 7010 6862 -148  - Misses 147 312 +165  + Partials 107 106 -1 
Impacted Files Coverage Δ
imblearn/over_sampling/base.py 100.00% <ø> (ø)
...rn/over_sampling/tests/test_random_over_sampler.py 100.00% <100.00%> (ø)
...otype_selection/tests/test_random_under_sampler.py 100.00% <100.00%> (ø)
...ing/_prototype_selection/tests/test_tomek_links.py 100.00% <100.00%> (ø)
imblearn/keras/tests/test_generator.py 9.37% <0.00%> (-90.63%) ⬇️
imblearn/tensorflow/_generator.py 27.58% <0.00%> (-68.97%) ⬇️
imblearn/tensorflow/tests/test_generator.py 10.75% <0.00%> (-54.84%) ⬇️
imblearn/keras/_generator.py 45.20% <0.00%> (-46.58%) ⬇️
imblearn/tests/test_docstring_parameters.py 87.32% <0.00%> (-0.71%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@glemaitre glemaitre changed the title updated sampling strategy string of oversampler base.py from majority to minority FIX make sure to accept "minority" as a valid strategy in over-samplers Dec 28, 2022
@glemaitre
Copy link
Member

I added some non-regression tests and an entry in the changelog.
I will probably try to make a release soon because it is a blocker.

@glemaitre glemaitre merged commit 79107e8 into scikit-learn-contrib:master Dec 28, 2022
@glemaitre
Copy link
Member

Thanks @Prakhyath07 I will fix the CI builds that are failing. There are not related.

glemaitre added a commit that referenced this pull request Dec 28, 2022
…rs (#964) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
@Prakhyath07
Copy link
Contributor Author

Reference Issue

What does this implement/fix? Explain your changes.

while using smapling strategy ="minority" we were getting error. i found issue in base.py of oversampler where in _parameter constraint majority was used in stroptions instead of minority

Any other comments?

From my side i didn't find any other issue
Thank you so much

@dront78
Copy link

dront78 commented Mar 18, 2023

where is 0.10.1?

@glemaitre
Copy link
Member

On PyPI and conda-forge, e.g. https://pypi.org/project/imbalanced-learn/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants