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

SOM bug fix and periodic boundary conditions #355

Merged
merged 4 commits into from
Aug 20, 2015
Merged

Conversation

Soletmons
Copy link
Contributor

There are two main changes:

-The Kohonen layer is updated with each sample, not just on each iteration. This prevents an issue where if the learning rate * the number of sample was > 1, the Kohonen layer was driven to extreme values.

-The Kohonen layer now has periodic boundaries. This is introduced through precomputing the influence array, then rolling it to the appropriate location for each sample.
(-) a new variable, self._dqdshape, is introduced to make computing the influence layer faster, as it now only needs to be calculated once per iteration and its shape does not change.

Both of these changes have a new test in test_som.py

Hopefully this helps! Apologies if I've done anything wrong, I'm quite new to github.

Include tests for kohonen updating bug fix, and periodic boundary condition code
Implement periodic boundary conditions in Kohonen layer. Fix bug in updating of Kohonen layer.
@mih
Copy link
Member

mih commented Aug 20, 2015

This looks good to me, thanks a lot. If there are no objections, I intend to merge this PR some time later today.

@Soletmons If you get a chance, please add yourself to the AUTHOR file. Thanks!

@Soletmons
Copy link
Contributor Author

Thanks! I've made a change to AUTHOR.

@nno
Copy link
Contributor

nno commented Aug 20, 2015

@Soletmons, thanks a lot for the work.
@Hanke no objections, I will go ahead and merge.

This addresses #342. PR #356 was added to include David in AUTHOR, so I will merge that as well.

@Soletmons, for future reference: you can update a current pull request by committing new changes and then push them again. In that way, a new PR is not needed very every update.

nno added a commit that referenced this pull request Aug 20, 2015
SOM bug fix and periodic boundary conditions
@nno nno merged commit 00e21f1 into PyMVPA:master Aug 20, 2015
This was referenced Aug 20, 2015
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.

3 participants