For loop index is too large when learning with anfis

I have data 7×108 for input. And 7x1 for target. When i try to run it, it got "Warning about for loop index is too large. Truncating to 9223372036854775807".
trnData = [input,target];
numMFs = 2;
mfType = 'gbellmf';
fismat = genfis1(trnData,numMFs,mfType);
How i can fix this problem, so i can make it learn with anfis? Thank you

3 Comments

What is your largest target (value) ? And is your target numeric?
This is my code for target:
target = zeros(7,1); target(1:7,:)=1;
Just wanna try it with 7 images with same gesture.

Sign in to comment.

 Accepted Answer

numMFs is the number of membership function per input. Your data has 108 columns so it has 108 inputs. Total number of membership functions is 2^108 .
You should be passing in the transpose of input -- and I do not think you should be including the target information with that.

3 Comments

My actual data performed for 7 different type of gesture. So i have 49 total images. And for target, i write it like:
target = zeros(total_images,1);
target(1:7,:) = 1;
target(8:14,:) = 2;
target(15:21,:) = 3;
target(22:28,:) = 4;
target(29:35,:) = 5;
target(36:42,:) = 6;
target(43:49,:) = 7;
Can you provide me code of numMFs with your solution?
Thanks for advance.
The problem is not that you specified 2 for the number of modular functions. The problem is that you passed in your input with rows and columns exchanged.
I already solved it with genfis2. Thank you @Walter Roberson.

Sign in to comment.

More Answers (0)

Categories

Find more on Fuzzy Logic Toolbox in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!