- Notifications
You must be signed in to change notification settings - Fork 1.3k
[WIP] Rose #750
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
[WIP] Rose #750
Conversation
Hello @andrealorenzon! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-09-16 09:03:36 UTC |
This pull request introduces 4 alerts when merging 0a3307b into 0acd717 - view on LGTM.com new alerts:
|
It looks like most the errors raised are linting errors. The pep8speaks/lgtm entries above should have most of them. If you want to test things locally, running pylint on your files should help catch most of these! The current version also looks like it''s pointing the user guide. It would be good to include a couple examples / an overview in the user guide as well. |
Thank you. I'll fix linting, and add documentation in the user guide. |
I marked this as a draft while a couple of these other points get worked on. When you're ready for some feedback, mark it as "Ready for Review" and we'll iterate! |
Are the PR automatically updated for new pushes on my fork repo? |
All pushed commits to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still a few linting errors (see logs here), I missed mentioning flake8
earlier.
See the review comments otherwise.
.. [1] N. Lunardon, G. Menardi, N.Torelli, "ROSE: A Package for Binary | ||
Imbalanced Learning," R Journal, 6(1), 2014. | ||
| ||
.. [2] G Menardi, N. Torelli, "Training and assessing classification | ||
rules with imbalanced data," Data Mining and Knowledge | ||
Discovery, 28(1), pp.92-122, 2014. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are great to include. References should be referenced from the main docstring for the class. A short summary of the method would also be good.
Here's an example from the BorderlineSMOTE
class:
imbalanced-learn/imblearn/over_sampling/_smote.py
Lines 219 to 224 in 0acd717
class BorderlineSMOTE(BaseSMOTE): | |
"""Over-sampling using Borderline SMOTE. | |
This algorithm is a variant of the original SMOTE algorithm proposed in | |
[2]_. Borderline samples will be detected and used to generate new | |
synthetic samples. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a better description in the docstring.
I would like to add more complete information on the maths in the docs too, but I'm not familiar with Sphinx. Could you point me to some instructions or metadocumentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Math typesetting should look familiar if you've seen LaTeX before, here's a short guide from sphinx's docs: https://www.sphinx-doc.org/en/1.0/ext/math.html. Syntax is based on reStructuredText, which feels similar to markdown but has a powerful directive system.
Could you point me to some instructions or metadocumentation?
Nothing specific to imblearn. If you want to learn more, sphinx's "Getting Started" guide is a good place to start. (I'd recommend it regardless. Sphinx is used for a huge number of projects, so the skill is extremely transferable).
Our Makefile
and conf.py
in the docs/
directory are fairly standard. Building local documentation then looks like:
cd docs/ make html xdg-open _build/html/index.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I will just have some problem with plots, but I'll manage to add everything to the docs.
I have another issue: failing checks, see below. It's not very clear to me what they do address at, and what to fix.
This pull request introduces 1 alert when merging 9ac2797 into 0acd717 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging c391ec3 into 0acd717 - view on LGTM.com new alerts:
|
going back to local development, I don't want to spam broken builds |
Reference Issue
First PR for implementation of Random OverSampling Example (ROSE) method.
What does this implement/fix? Explain your changes.
I drafted the class ROSE, but I have still some error on common test units. I would need a help to understand what I did miss.
Any other comments?