I have data 322*91 .
322*88 is my input , my features. 322*3 my outputs, my targets.
My neural network result is not good because 88 features is more according to 322 datas.
Data should be more to get good accuracy.
But I have no chance to increase it.
So I want to apply PCA to decrease 88 features but I couldn't manage to apply it in correct way.
How can I do that?
When I write the code newinput=pca(input)
it decreases row number and gives 88*88 .
I need to keep row number (322) and decrease only 88 numbers.
Codes are below for neural network
And data is attached.
trainFcn = 'trainscg';
hiddenLayerSize = [5 4 3];
net = patternnet(hiddenLayerSize, trainFcn);
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
[net,tr] = train(net,x,t);
y = net(x);
e = gsubtract(t,y);
performance = perform(net,t,y)
tind = vec2ind(t);
yind = vec2ind(y);
percentErrors = sum(tind ~= yind)/numel(tind);