- Ensure that the input training data format is compatible with what the “anfis” or “genfis” functions expect
- Step through the code using the debugger and identify where the test fails
ANFIS: getting an errorr that the number of rules needs to be the same as the number of output MF's. Can anyone help explain?
22 ビュー (過去 30 日間)
古いコメントを表示
I am trying to train a Sugueno FIS model with some dummy data for demonstration purposes. The FIS has four inputs each with three MF's. I have successfully loaded the training data but get an error message that the number of rules has to be the same as the number of output membership functions. I have 81 rules in the model. Can someone help me understand what I am doing wrong?
0 件のコメント
回答 (2 件)
Gautham Sholingar
2016 年 9 月 22 日
Hello Peter,
I understand that you are trying to train a Sugeno-type FIS model with sample data to demonstrate how the ANFIS system works. I am assuming that your problem structure will be similar to some of the examples presented in MATLAB documentation. Execute the following command in your MATLAB command window to open a simple example of using ANFIS to model a system.
>> openExample('fuzzy/TrainANFISWithCustomNumberOfTrainingEpochsExample')
Please feel free to copy this code over as a starting template for your ANFIS test and modify accordingly to suit your datasets.
Some possible troubleshooting steps for your case:
Please refer to the following documentation for more information on how to use the “anfis” function
If you want a more detailed example with ANFIS, MATLAB comes pre-loaded with an inverse kinematics simulation which uses ANFIS to model the Inverse Kinematics of a 2-joint robot arm.
In order to open this simulation, please execute the following command in the MATLAB command window:
>> openExample('fuzzy_featured/invkine_codepad')
The following link explains how ANFIS is used in this model in detail:
The above links should serve as good starting points and templates to help resolve your issue.
0 件のコメント
Chad MacDonald
2022 年 1 月 4 日
The ANFIS training algorithm requires that the Sugeno system must not have any rule sharing; that is one rule per output membership function. For more information on the requirements for ANFIS tuning, see Neuro-Adaptive Learning and ANFIS.
Another option is to tune your FIS using using the tunefis function, which was introduced in R2019a. With this function, you can tune your system using other methods, such as genetic algorithms and pattern search. These methods require Global Optimization Toolbox® software and do not have the same constraints as ANFIS training. For more information, see Tuning Fuzzy Inference Systems.
To follow-up on Gautham's previous answer, the command for opening the inverse kinematics example has changed to the following:
openExample('fuzzy/invkine_codepad')
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fuzzy Inference System Tuning についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!