I need to get ranges of membership functions of inputs in an anfis in matlab. I use the following code to train my network and successfully train the network. But what I need is to get the value of ranges that the network finds for membership functions of inputs. I mean if a membership function is a bell-shaped one, like gbellmf
, it would have this formula (x)= exp{-((x-c)/a)^(2*b)}
and I need to know the value of a
, b
and c
after the network is trained.
function trainedfis = main(data,chkdata)
fis = genfis1(data,[3 3 3],char('gbellmf','gbellmf', 'gbellmf'));
[trainedfis,errors,stepssize,chkfis,errchk] = anfis(data,fis,3,[1 1 1 1],chkdata);
end
also my data is a three input and one output data (3 columns for input and 1 column for output).
I use the built in genfis1
and anfis
of matlab.
You can access all parameters of
j
-th membership function ofi
-th input by:In the following example I trained fis for the Iris Data, which has 4 inputs. Then I used data stored in
fismat
to plot all membership functions: