How to adjust the parameters of membership function after the ANFIS is trained
1 次查看(过去 30 天)
显示 更早的评论
I use the 'Neuro-Fuzzy Designer' (anfis) to train a dataset of 3 inputs and one output. I have positive inputs and outputs values, but the resulted training and testing outputs include some negative values. I think this is because the membership function for the input 3 ranges from -0,5 to 0.4828 as shown in figure 1. How could I make this membership function ranging from 0 to 1 in order to not consider negative values?
0 个评论
回答(1 个)
Sam Chak
2025-4-19
Hi @sarara
If the ANFIS model has been successfully trained and the performance is satisfactory, except for the aesthetic aspect where the 'negative value' appears in the parameter of the triangular membership function (mf1), you can manually modify the parameter using the straightforward steps outlined below:
fis = mamfis('NumInputs', 3, 'NumInputMFs', 3, 'NumOutputs', 1, 'NumOutputMFs', 8);
%% original parameters of mf1
fis.Inputs(1).MembershipFunctions(1)
plotmf(fis, 'input', 1), grid on
title('Before modifying parameters of mf1')
%% modified parameters of mf1
fis.Inputs(1).MembershipFunctions(1).Parameters(1) = 0;
fis.Inputs(1).MembershipFunctions(1)
figure
plotmf(fis, 'input', 1), grid on
title('After modifying parameters of mf1')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fuzzy Logic Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

