Skip to main content
. 2019 May 9;9(2):52. doi: 10.3390/diagnostics9020052
function [performance] = CrispOutputs(fis,trainingdata,validationdata,testingdata,indicesinputs,indicesoutputs,combination);
inputtrainingdata = trainingdata(:,indicesinputs(combination,:));
outputsdata = trainingdata(:,indicesoutputs(combination,:));
fisoutputstrainingdata = evaluate the performance with the inputtrainingdata variable.
calculate correlation coefficient (regression) using outputsdata and fisoutputtrainingdata;
calculate the square of the correlation coefficient (R2)
inputvalidationdata = validationdata(:,indicesinputs(combination,:));
outputsdata = validationdata(:,indicesoutputs(combination,:));
fisoutputsvalidationdata = evaluate the performance with the inputvalidationdata variable.
calculate correlation coefficient (regression) using outputsdata and fisoutputvalidationdata;
calculate the square of the correlation coefficient (R2)
inputtestingdata = testingdata(:,indicesinputs(combination,:));
outputsdata = testingdata(:,indicesoutputs(combination,:));
fisoutputstestingdata = evaluate the performance with the inputtestingdata variable.
calculate correlation coefficient (regression) using outputsdata and fisoutputtestingdata;
calculate the square of the correlation coefficient (R2);
 
Calculate the total performance using the complete dataset (training, validation, and testing).
Calculate correlation coefficient (regression) using totaloutputsdata and fisoutputtotaldata.
Calculate the square of the correlation coefficient (R2).
 
performance = [R2_total,R2_training,R2_validation,R2_testing];
end