Skip to content
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

Merged
merged 1 commit into from
Jun 6, 2014

Conversation

hpxro7
Copy link
Collaborator

@hpxro7 hpxro7 commented Jun 6, 2014

There was a minor implementation bug in base/instances.go in regards to the Shuffle() method on Instances that causes it to create a non-uniform distribution of shuffle permutations. I've changed it to implement the correct Fisher-Yates algorithm.

@penberg
Copy link
Contributor

penberg commented Jun 6, 2014

Travis CI thinks gonum's mat64 is broken. Did "go test" work on your local machine?

# github.com/gonum/matrix/mat64
../../gonum/matrix/mat64/dense_arithmetic.go:339: undefined: blas.RowMajor
../../gonum/matrix/mat64/dense_arithmetic.go:346: too many arguments in call to blasEngine.Dgemm
../../gonum/matrix/mat64/lq.go:117: undefined: blas.ColMajor
../../gonum/matrix/mat64/lq.go:122: too many arguments in call to blasEngine.Dgemv
../../gonum/matrix/mat64/lq.go:136: undefined: blas.ColMajor
../../gonum/matrix/mat64/lq.go:141: too many arguments in call to blasEngine.Dgemv
../../gonum/matrix/mat64/lq.go:174: undefined: blas.RowMajor
../../gonum/matrix/mat64/lq.go:178: too many arguments in call to blasEngine.Dtrsm
../../gonum/matrix/mat64/vec.go:84: undefined: blas.RowMajor
../../gonum/matrix/mat64/vec.go:92: too many arguments in call to blasEngine.Dgemv
../../gonum/matrix/mat64/vec.go:92: too many errors

The command "go get -v ./..." failed and exited with 2 during .

Your build has been stopped.

"math/rand"

"github.com/gonum/matrix/mat64"
Copy link
Contributor

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.

Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

@penberg
Copy link
Contributor

penberg commented Jun 6, 2014

Looks like a gonum/matrix problem.

@kortschak
Copy link

We're waiting on review, but it is fixed in this change.

@hpxro7
Copy link
Collaborator Author

hpxro7 commented Jun 6, 2014

Roger that. Thanks!

@penberg
Copy link
Contributor

penberg commented Jun 6, 2014

Could someone try to trigger Travis CI build for this pull request? It should work now.

@sjwhitworth
Copy link
Owner

Done. Builds now I think.

@penberg
Copy link
Contributor

penberg commented Jun 6, 2014

Great, maybe someone can merge this then. 😄

Sentimentron added a commit that referenced this pull request Jun 6, 2014
Fixed incorrect instance shuffling algorithm.
@Sentimentron Sentimentron merged commit 8cc8aea into sjwhitworth:master Jun 6, 2014
@hpxro7 hpxro7 deleted the bug/shuffle branch September 29, 2014 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants