-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fixed incorrect instance shuffling algorithm. #41
Conversation
Travis CI thinks gonum's mat64 is broken. Did "go test" work on your local machine?
|
"math/rand" | ||
|
||
"github.com/gonum/matrix/mat64" |
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 don't know how pedantic we are with these but this is diff noise that can be fixed by gofmt
.
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 think this is because some people use gofmt
while others use goimport
. The order of the two package is somehow a little different.
Personally, I use goimport
becasue it can also handle import
.
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.
go test
passes on my machine.
As far as the diff noise goes, @lazywei is right, I do use goimport
. As a side note, gofmt
does not seem to collapse the empty blankline space between the local/external package imports if its already there.
Looks like a gonum/matrix problem. |
We're waiting on review, but it is fixed in this change. |
Roger that. Thanks! |
Could someone try to trigger Travis CI build for this pull request? It should work now. |
Done. Builds now I think. |
Great, maybe someone can merge this then. 😄 |
Fixed incorrect instance shuffling algorithm.
There was a minor implementation bug in
base/instances.go
in regards to theShuffle()
method onInstances
that causes it to create a non-uniform distribution of shuffle permutations. I've changed it to implement the correct Fisher-Yates algorithm.