function [preROC aftrROC]=NSFcorrect()
	%load data files, these are CERT outputs in CSV format w/ some postprocessing
	calCERT=load('data/3.mov.cert.csv');
	au4CERT =load('data/4.mov.cert.csv');


	%A self-test on training data
	testCERT = [calCERT;au4CERT];
	testLabel =[zeros(size(calCERT,1),1);ones(size(au4CERT,1),1)];

	%do correction
	predAU = Correction(calCERT(:,4), calCERT(:,26:28), testCERT(:,4), testCERT(:,26:28));

	%ROCs
	preROC=ROC_area(testCERT(:,4), testLabel);
	aftrROC=ROC_area(predAU , testLabel);
	fprintf('Before %f, After %f\n', preROC, aftrROC);


%the correction function:
%calAU:   CERT one AU output at calibration session (single n x 1 column)
%calPose: CERT Pose input at calibration session (n x 3 matrix) 
%rawAU:   CERT one AU output before correction (single m x 1 column)
%rawPose: CERT Pose input before correction(m x 3 matrix)
%predAU: corrected AU output (m x 1)

function predAU = Correction(calAU, calPose,  rawAU, rawPose)
	% SVR model
	load('bestGMRopt.mat'); % currently bestopt is just an integer: 8
	GMRmodel = GMRtrain(calAU, calPose, bestopt);
	GMRbaseline = GMRpredict(rawPose, GMRmodel);
	predAU = rawAU - GMRbaseline;
