find the value/s of the membership function when a crisp value is given???
4 views (last 30 days)
I am not that much dealing with Matlab so my knowledge on it is quite limited. I want to work on Long Shor-Term Memory network (lstmlayer) function in matlab that uses for time series classification problems. As I can understand from the given definition of this function, the input is a cell array type and the output is a categorical type. My data is a crisp value (please see the attached mat file) data which contains a numerical data represented as 5 columns. Each column from column one to four representing a feature as; (start time, end time, duration and activity count for each class(column 5)), the last column has the class (output ) that I am going to classify using the LSTM. I did convert it to cell array data for the inputs and categorical data representing the classes in the outputs and used it as inputs and outputs to the lstm and it is working perfectly.
What I am looking for now is to fuzzify these crisp values (in the inputs) and representing them using any of the MFs like "gaussmf" and then use these fuzzified values as an input to the lstm network. Hopefully, by that, I gave you the idea that I want to apply. Please accept my apologies for wasting your time.
Thanks in advance
Sam Chak on 20 Sep 2022
Hi @Gadelhag M Omar Mohmed, It might be a little late answering this.
But a data-driven Mamdani Fuzzy System can be generated using the Fuzzy Clustering Method (FCM).
The Gaussian membership functions (gaussmf) are used for each FIS input.
inputData = set5_v73(:, 1:4);
outputData = set5_v73(:, 5);
opt = genfisOptions('FCMClustering', 'FISType', 'mamdani');
fis = genfis(inputData, outputData, opt)
% Plotting Fuzzy Inputs
plotmf(fis, 'input', 1)
plotmf(fis, 'input', 2)
plotmf(fis, 'input', 3)
plotmf(fis, 'input', 4)
% Plotting Fuzzy Output
plotmf(fis, 'output', 1)