-
Notifications
You must be signed in to change notification settings - Fork 134
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
noncontiguous splits samples generator #271
base: master
Are you sure you want to change the base?
Conversation
NonContiguous(attr='time', | ||
dist=60, | ||
partition_keep=2, | ||
partition_trim=1)]) |
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.
please reformat using ReST formatting, otherwise would not look good on the web. Checkout other docstrings for examples
code without unittests is broken code ;) |
|
||
class NonContiguous(Node): | ||
"""Generator to remove samples too close as measured with a sample attribute | ||
``` partitioner = ChainNode([NFoldPartitioner(), |
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.
We use numpy style docstrings, and run doctests which allows to assure that code we inject is correct. Ideally such a snippet should be entered in the same fashion, see various places around the code (where there is Examples in docstrings) .e.g within mvpa2/base/dataset.py
@bpinsard interested to work on this one a bit further? (comments were posted a bit ago) |
So what is the state of things? Having the doc snippet as a test would be nice, but OTOH it doesn't do something real anyway. Can we merge this before the 12 months mark? ;-) |
Current coverage is 76.41% (diff: 89.18%)@@ master #271 diff @@
==========================================
Files 364 364
Lines 41179 41215 +36
Methods 0 0
Messages 0 0
Branches 6599 6592 -7
==========================================
+ Hits 31465 31493 +28
- Misses 7785 7792 +7
- Partials 1929 1930 +1
|
see the doc for further description
do not know if this is the optimal or recommended coding, waiting for ideas/comments.