Self Organizing Map (SOM) plot interval saving process

4 次查看(过去 30 天)
I want to save the figure of SOM (ex:plotsompos) according to the iteration(or epoch).
My code is written in below, and I want to save the plotsompos according to the epoch (at epoch 100, 200, 300, 400).
However, I don't know the way, and downward code just give the plotsompos at epoch 1000.
Is there any way to save the figure according to the epoch?
net = selforgmap([dimension1,dimension2]);
net.trainParam.epochs = 1000;
[net,tr] = train(net,X3);
figure(); plotsompos(net,X3); title('whole')

回答(1 个)

Srivardhan Gadila
From the documentation of selforgmap, Neural Network Object Properties & Neural Network Subobject Properties I cannot find any inbuilt method to plot and save in between epochs. As a workaround you can write a for loop to get the plots at required intervals as follows:
net = selforgmap([dimension1,dimension2]);
net.trainParam.epochs = 100;
for i=1:10
[net,tr] = train(net,X3);
figure(); plotsompos(net,X3); title("plot after "+num2str(i*100)+" epochs")
end

类别

Help CenterFile Exchange 中查找有关 Sequence and Numeric Feature Data Workflows 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by