splitWithProportion works now for different dataset classes - #164
splitWithProportion works now for different dataset classes#164fzalkow wants to merge 2 commits into
Conversation
|
The bug was introduced in this commit: 2f02b8d |
…roportion Now splitWithProporion uses numpy array indicies with numpy.random.permutation instead of for loop, before this change on large datasets this method was very slow, now its finish almost instant.
|
This still isn't working for me, any help? |
|
This pull request is nearly one and a half years old. For me |
|
It still raises an error for me on version 0.3.3 (latest), trndata._convertToOneOfMany() Sorry, I didn't notice the date on the thread earlier. Would you suggest I create a new issue for this? |
|
Oh, you are right. I tried with version 3.0, that didn't raise an error. With the latest release, the error seems to be there again. My pull request still fixes this as far as I see. So it could just be merged, no new issue needed... |
|
Yeah, for now I am using the workaround described here: http://stackoverflow.com/questions/27887936/attributeerror-using-pybrain-splitwithportion-object-type-changed |
I fixed an issue: When doing
splitWithProportionon aClassificationDataSet, the resulting datasets has been of typeSupervisedDataSet:This is because
ClassificationDataSetinherits its methodsplitWithProportionfromSupervisedDataSet. So I fixed this by dynamically detecting the class ofselfin the attribute, and instantiating these classes.Related: http://stackoverflow.com/questions/27887936/attributeerror-using-pybrain-splitwithportion-object-type-changed