Competitive Layer Network (newc) not learning

Hello everbody,
i tried to run the expample in the user guide (the one with p = [.1 .8 .1 .9; .2 .9 .1 .8]) and encountered some problems. The weights of the network always stay at .5 .5; .5 .5. Consequently, it cannot divide the inputvectors correctly - they all belong to the same class. Is that a bug or am I doing sth. wrong? Also, the training-function is 'trainru', not 'trainr' as described in the documentatin-but i my opinion, this is correct as there is no target.

답변 (1개)

TED MOSBY
TED MOSBY 2025년 5월 14일

0 개 추천

Hi Oliver,
This was a known bug in R2010b and R2011a that prevented competlayer / newc networks from updating their weights. The problem was fixed in R2011b and all later versions. Please upgrade to a higher version for the fix.
Additonally you can refer to this MATLAB answer discussion as well: https://www.mathworks.com/matlabcentral/answers/15334-kohonen-example-from-help-does-not-work
Regarding the difference between trainru and trainr :
  • trainru: Unsupervised incremental learning, updates weights after each input without targets—Kohonen‑style competitive learning.
  • trainr: Supervised incremental learning, updates weights after every input/target pair.
Newc builds an unsupervised competitive network, so its trainFcn is deliberately set to 'trainru'.
Here is the documentation for both the functions:

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

질문:

2011년 4월 6일

답변:

2025년 5월 14일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by