Closed InterferencePattern closed 4 years ago
Since estimator tags have been merged into scikit-learn
master #167 could be continued.
This has been solved in master.
This is working on master, however, the ratio argument appears to have been removed. Is there anyway to specify the sampled ratio now?
@davidfstein I think the sampling_strategy
parameter is what you're looking for. See the float
case in the RandomOverSampling
docs, or this sampling_strategy
tutorial.
Just adding that ee deprecated ratio
because it was not an intuitive name
when we started to extend the way resampling should work.
However, as mentioned in the previous message, sampling_strategy
will
support the same use case than ratio
.
On Tue, 1 Sep 2020 at 21:57, Alexander L. Hayes notifications@github.com wrote:
@davidfstein https://github.com/davidfstein I think the sampling_strategy parameter is what you're looking for. See the float case in the RandomOverSampling https://imbalanced-learn.org/stable/generated/imblearn.under_sampling.RandomUnderSampler.html docs, or this sampling_strategy tutorial https://imbalanced-learn.org/stable/auto_examples/plot_sampling_strategy_usage.html .
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/scikit-learn-contrib/imbalanced-learn/issues/699#issuecomment-685098510, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABY32P4YU74K7FZTYWG7HELSDVG3LANCNFSM4LHMGIPA .
-- Guillaume Lemaitre Scikit-learn @ Inria Foundation https://glemaitre.github.io/
Description
RandomUnderSampler
should permit undersampling a dataset containing NaNs. I don't see a reason this should be blocked by the def _check_X_y() function.Steps/Code to Reproduce
make_imbalance()
with a dataset containing NaN.Expected Results
Function should return X and y datasets
Actual Results
ValueError: Input contains NaN
Versions
Python 3.6.9 (default, Sep 11 2019, 16:40:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)] NumPy 1.18.1 SciPy 1.4.1 Scikit-Learn 0.22.2.post1 Imbalanced-Learn 0.5.0