Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove for loop from datasets.supervised.SupervisedDataSet.splitWithP…
…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.
- Loading branch information
Nihn
committed
Jan 5, 2015
1 parent
91f66f6
commit 2f02b8d
Showing
1 changed file
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2f02b8d
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.
This commit breaks polymorphism: When called on an
ClassificationDataSet
(as shown in the tutorials) it no longer returnsClassificationDataSet
s butSupervisedDataSet
s.See discussion here: http://stackoverflow.com/questions/27887936/attributeerror-using-pybrain-splitwithportion-object-type-changed/30869317#30869317
And pull request here: #164