フィルターのクリア

what is the option to save the weights from plotsomplanes?

2 ビュー (過去 30 日間)
shazia
shazia 2023 年 6 月 14 日
コメント済み: shazia 2023 年 6 月 16 日
i want to save the weights from plotsomPlanes so that i could use these waiegts as input for another network like ANFIS to improve the results is it possible? please guide
thank you

採用された回答

Gourab
Gourab 2023 年 6 月 14 日
Hi Shazia,
I understand that you want to save the weights from the plotsomPlanes function to use in some other network like ANFIS.
It's possible to use the weights obtained from the ‘plotsomPlanes’ function in the SOM network as inputs to other machine learning algorithms like ANFIS to improve their results.
We can extract the weights of the SOM neurons by accessing the children property of the plot object.
Please refer to the below code snippet
data = load('sample_data.mat');
net = selforgmap([10 10]);
net = train(net, data.inputs');
plotsomPlanes(net);
% Extract SOM weights
plot_obj = gcf; % Get handle of the SOM plots
weights = [];
for i = 1:length(plot_obj.Children)
if isa(plot_obj.Children(i), 'matlab.graphics.primitive.Image')
weights = [weights; plot_obj.Children(i).CData(:)'];
end
end
% Use SOM weights as input to ANFIS
anfis_in = [data.inputs', weights];
anfis_out = data.targets';
anfis_model = anfis(anfis_in, anfis_out);
I hope this helps you to resolve the query.
  1 件のコメント
shazia
shazia 2023 年 6 月 16 日
Thank you so much , i will try this!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFuzzy Logic Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by