[pymvpa] tiny suggestion for SOM (10 second change)

Nick Oosterhof nikolaas.oosterhof at unitn.it
Tue Mar 12 10:26:37 UTC 2013

On 11 March 2013 20:29, Ike Hall <ike.hall at gmail.com> wrote:
>> On 10 March 2013 23:47, Ike Hall <ike.hall at gmail.com> wrote:
>>> It would appear that the SimpleSOMMapper class performs the
>>> initialization
>>> of it's Kohonen layer in the SimpleSOMMapper._train method.  As the
>>> .train()
>>> method calls ._pretrain, ._train, and ._posttrain in order, I submit that
>>> it
>>> would be preferable to move the initialization phase to ._pretrain.
>> Or do you have other suggestions on what to move to _pretrain?
> In summary:  Moving the first line to _pretrain is something I would
> strongly advocate.
> moving dqd to be stored in self at initialization is something I would
> advocate for, but far less strongly, as someone wanting to use a different
> distance function would (likely?) also want to override the
> _compute_influence_kernel method, and at that point they are not far from
> overriding all of _train.

All right, I added these changes to my branch [1] and sent a pull
request [2] for the main branch.
If you have comments on the code please make comments on github [2] so
that everyone can see them.


[1] https://github.com/nno/PyMVPA
[2] https://github.com/PyMVPA/PyMVPA/pull/110

More information about the Pkg-ExpPsy-PyMVPA mailing list