Change trainingmode of Self-Organizing Maps

1 Ansicht (letzte 30 Tage)
Max Bauer
Max Bauer am 17 Jul. 2015
Bearbeitet: Nick Hobbs am 21 Jul. 2015
I want to sort rotordata, which can be shifted, with a SOM. Till now I shifted the data by using some specialpoints in the dataset, but this is not perfect. My solution is to change the SOM-algorithm, so it will not only check all euklidian distances of the outputneurons, but also trys all rotations of the weightvectors.
Where can I change the code? I cant find it in trainbu Thank you!

Antworten (1)

Nick Hobbs
Nick Hobbs am 21 Jul. 2015
Bearbeitet: Nick Hobbs am 21 Jul. 2015
In the documentation for trainbu, under the heading 'Network Use', you will see you can assign a learning function to a network using 'NET.inputWeights{i,j}.learnFcn'. If you do this for each weight, you will have effectively changed how the network learns. If we look at the learning function for a standard self-organizing map
net = selforgmap([8 8]);
>> net.inputWeights{1,1}
ans =
Neural Network Weight
delays: 0
initFcn: 'initsompc'
initSettings: .inputSize, .sampleSize, .numElements
learn: true
learnFcn: 'learnsomb'
learnParam: .init_neighborhood, .steps
size: [64 0]
weightFcn: 'negdist'
weightParam: (none)
userdata: (your custom info)
From this output, 'learnFcn' is 'learnsomb'. You cannot edit this file, however you can use it as a template for your own learning function. If you create a new function 'customLearningFunction' that meets the requirements for a learning function and is in your path, then you can set each weight in your network to 'customLearningFunction' and use this instead of the default learning function.

Community Treasure Hunt

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

Start Hunting!

Translated by