function [result] = computeMMRE(results, dataset, mm)

addpath("./UTIL", "./GA", "./KEYS", "./DATASETS");

% Assumes effort is the last column of the data
% Assumes effort is the last column of the data
load(dataset);


for i = 1 : 20
	
	% Randomly shuffle dataset to produce Training and Testing data
	a = data(:,:,i);
	x = size(a);
	trainingData = a(1: 2 * floor(x(1) / 3) , :);
	testingData = a(2 * floor(x(1) / 3) + 1 : 3 * floor(x(1) / 3), :);
	[numprojects, numfeatures] = size(trainingData);
	
	[tD, junk] = size(trainingData);
	
	% Compute mmre and append to results
	j = [1,10,100];
	for k = 1 : 3
		result(k,i) = fwpsabe(trainingData, testingData, results(j(k), 1:size(trainingData),i), results(j(k),tD+1:end-1,i), mm);
	end
end
