Make AFQDataset work with different input formats and make indexable #105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #98
This PR
__getitem__
and__len__
methods and a shape parameter. This means users can do things likedataset[10:20]
and also thatAFQDataset
s can be used as input to sklearn functions liketrain_test_split
.AFQDataset
's docstringNote that I chose a different solution to dataset splitting than the one I proposed in #98. I think making the datasets indexable and therefore interoperable with scikit-learn's already existing, performant, and robust model selection routines is a much better solution than rolling our own
split
method.This doesn't resolve the need for imputation methods, which we hint at in #98 but I now think that if we still want those, we should open up another issue and PR for that.