Introduction
For offline analysis, neuro network algorithm can provide high performance on classification; but it is insufficient. In order to obtain even higher accuracy (93% or above), Neuro-Fuzzy system which consists of Fuzzy-Inference System and Neuro-Adaptive Learning is the best candidate.
Fuzzy inference is the process of creating the mapping from a given input to an output using fuzzy logic. It looks at the world in imprecise terms, in the same way that our brain looks at information, then responds with precise actions. Fuzzy logic is different from classical logic in that the statements are no longer true or false, on or off. Instead, a statement can assume any real value between 0 and 1.
Generally, Fuzzy inference process can be divided into three steps: Fuzzification which translates input into truth values, Rule Evaluation which computes output truth values, and Defuzzification which transfers truth values into output.
In detailed, we need to take the inputs and determine membership functions first. Secondly, fuzzify the inputs using membership functions. Thirdly, combine the inputs according to the rules to build the rule’s strength. Next, find the consequence of the rule. Fifth, aggregate the consequences to get output contribution. Finally, defuzzify the output. The scripts are written in MATLAB with Fuzzy Logic Toolbox.
% Final Project --- Applied Intelligence for Engineering
% Neuro-Fuzzy Inference System
% Generate the FIS using subtractive clustering
myfis = genfis2(train,trout,0.2);
% Assign names to inputs and outputs
myfis = setfis(myfis,'input',1,'name','Channel_MNF');
myfis = setfis(myfis,'input',2,'name','Channel_RMS');
myfis = setfis(myfis,'input',3,'name','Channel_ZC');
myfis = setfis(myfis,'input',4,'name','Channe2_MNF');
myfis = setfis(myfis,'input',5,'name','Channe2_RMS');
myfis = setfis(myfis,'input',6,'name','Channe2_ZC');
myfis = setfis(myfis,'output',1,'name','OutputValue');
Afterwards, we use Neuro-Adaptive Learning to train our FIS by extracting a set of rules that models the data behavior. It uses a hybrid learning algorithm, which combines the least squares and back-propagation gradient descent methods, to tune the parameter of a fuzzy inference system. After training, we can use test data to evaluate the accuracy of our classifier.
% Train the FIS using Adaptive Neuro-Fuzzy Inference System (ANFIS)
trnData = [train trout];
trnOpt = 100; dispOpt = [0 1 0 0]; % display error values on Command Window
[classifier,error] = anfis(trnData,myfis,trnOpt,dispOpt);
% Using checking data to calculate the accuracy
output = evalfis(tesin,classifier);
for i = 1:length(output)
finaloutput(i) = output2label(output(i));
end
Feel free to contact me for more details.