Skip to content

How to specify resampling range? #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
naeemmrz opened this issue Feb 14, 2022 · 2 comments
Open

How to specify resampling range? #26

naeemmrz opened this issue Feb 14, 2022 · 2 comments

Comments

@naeemmrz
Copy link

naeemmrz commented Feb 14, 2022

Hello,

I'm trying to use SMOGN on my dataset, the default parameters are good to some extent but I was wondering if I could specify the range I want to oversample or undersample?
For example, my Y variables are between 3-8, and there really only a few data points for numbers between 7-8, how can I oversample only the data points between 7-8?

The advanced example have something like this mentioned

## specify phi relevance values
rg_mtrx = [

    [35000,  1, 0],  ## over-sample ("minority")
    [125000, 0, 0],  ## under-sample ("majority")
    [200000, 0, 0],  ## under-sample
    [250000, 0, 0],  ## under-sample
]

But I couldn't make sense of these values, in [35000, 1, and 0], what are the 1 and 0 for? what do they represent? It says somewhere that it's a 2d array (format: [x, y]), which xy is it? and why are there 3 values if it's only x and y?

Thanks in advance for any help :)

@nickkunz
Copy link
Owner

nickkunz commented Apr 12, 2022

@naeemmrz please take a closer look at the functions contained here: https://github.com/nickkunz/smogn/blob/master/smogn/phi_ctrl_pts.py.

I hope this addresses your question. If not, please let me know and I will do my best to help answer for you and others.

If there are others with this question, please comment. Thank you.

@naeemmrz
Copy link
Author

@nickkunz sorry for the late reply.
I did check those functions before posting here, I couldn't derive a conclusion from them (I'm still an intermediate Python user :D)
If you couldn't spare the time to explain it, it would be much helpful.

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

No branches or pull requests

2 participants