Skip to content

Conversation

dvro
Copy link
Member

@dvro dvro commented Jul 30, 2016

function make_imbalance to help artificially generate imbalance data from a given dataset.
This might be helpful for experiments, and for our toy problems and experiments.

included tests and example (image bellow).

make_imbalance_ratio

@coveralls
Copy link

coveralls commented Jul 30, 2016

Coverage Status

Coverage increased (+0.06%) to 98.044% when pulling a7c6158 on dvro:datasets into b26be15 on scikit-learn-contrib:master.

@dvro
Copy link
Member Author

dvro commented Jul 30, 2016

@chkoar @glemaitre, thoughts?

y_resampled : ndarray, shape (n_samples_new)
The corresponding label of `X_resampled`
"""
if ratio <= 0.0 or ratio >= 1.0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would check the function _validate_ratio to be sure about the boundary values.

@glemaitre
Copy link
Member

It seems fine for me. I would maybe add some verbose using the logger maybe. If I remember, it look like what you were speaking in the gitter.

@chkoar
Copy link
Member

chkoar commented Jul 30, 2016

LGTM! After this PR could we address the problem with #113?

@glemaitre glemaitre changed the title adding make_imbalance function [MRG] adding make_imbalance function Jul 31, 2016
@dvro dvro merged commit 84e6af4 into scikit-learn-contrib:master Jul 31, 2016
@glemaitre glemaitre mentioned this pull request Jul 31, 2016
christophe-rannou pushed a commit to christophe-rannou/imbalanced-learn that referenced this pull request Apr 3, 2017
glemaitre pushed a commit to glemaitre/imbalanced-learn that referenced this pull request Jun 15, 2017
glemaitre pushed a commit to glemaitre/imbalanced-learn that referenced this pull request Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants