ImportingData = [pwd,'\Data.csv'];
data = readtable(ImportingData);
Inputs = [data.SV.';data.SF.'];
Responses = [data.PDC.'; data.JLwS.'; data.JLwoS.'; data.P.'];
hiddenLayerSize = [8,24];
net = fitnet(hiddenLayerSize,trainFcn);
net.layers{1}.transferFcn = 'tansig';
net.layers{2}.transferFcn = 'tansig';
net.layers{3}.transferFcn = 'tansig';
net.divideParam.trainRatio = 70/100;
net.divideParam.valRatio = 15/100;
net.divideParam.testRatio = 15/100;
[net,tr] = train(net,Inputs,Responses);
Predictions = net(Inputs);
Errors = gsubtract(Responses,Predictions);
Performance = perform(net,Responses,Predictions);
RE = (Predictions-Responses)./Responses.*100;
R2_PDC = 1 - (sum((Responses(1,:)-Predictions(1,:)).^2))/(sum((Responses(1,:)-mean(Responses(1,:))).^2));
R2_JLwS = 1 - (sum((Responses(2,:)-Predictions(2,:)).^2))/(sum((Responses(2,:)-mean(Responses(2,:))).^2));
R2_JLwoS = 1 - (sum((Responses(3,:)-Predictions(3,:)).^2))/(sum((Responses(3,:)-mean(Responses(3,:))).^2));
R2_P = 1 - (sum((Responses(4,:)-Predictions(4,:)).^2))/(sum((Responses(4,:)-mean(Responses(4,:))).^2));
ImportingData = [pwd,'\Data_Extrapolate.csv'];
data = readtable(ImportingData);
Inputs = [data.SV.';data.SF.'];
NewOutputs = net(Inputs);