function [algorithmResult] = pseudoActualAlgorithmRunner(testSet, trainSet, currentAlgorithm, currentPreProcessor, isThereGacPruning)

% define a variable that will keep the results for each algorithm
% initialize cells to -1, at the end all -1's should have been changed
% actual10by3values = -1 * ones(1,10*size(dataset,1));

currentAlgorithm = char(currentAlgorithm);
algorithmResults = -1 * ones(1,size(testSet,1));
tempDataset = trainSet;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% code inside these lines are for gac pruning if pruning was selected
if isThereGacPruning == 1
    [myTree, myRoot] = simpleGACGenerator(tempDataset);   % generate tree
    % prune high variance sub-trees
    [trainSet] = gacPruner(myTree, myRoot);
end

if size(trainSet,1) == 0 || size(testSet,1) == 0
    size(trainSet)
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% now start running the algorithms and storing the results
if strcmp(currentAlgorithm, 'SWReg') == 1
    algorithmResult = swRegression10by3(testSet, trainSet);
     
elseif strcmp(currentAlgorithm, 'SLReg') == 1
    algorithmResult = slRegression10by3(testSet, trainSet);
     
elseif strcmp(currentAlgorithm, 'CART-On') == 1
    algorithmResult = CARTOn10by3(testSet, trainSet);
     
elseif strcmp(currentAlgorithm, 'CART-Off') == 1
    algorithmResult = CARTOff10by3(testSet, trainSet);
     
elseif strcmp(currentAlgorithm, 'PLSR') == 1
    algorithmResult = myPLSR10by3(testSet, trainSet);
     
elseif strcmp(currentAlgorithm, 'PCR') == 1
    algorithmResult = myPCR10by3(testSet, trainSet);
     
elseif strcmp(currentAlgorithm, '1NN') == 1
    algorithmResult = OneNN10by3(testSet, trainSet, currentPreProcessor);
     
elseif strcmp(currentAlgorithm, 'NNet') == 1
    algorithmResult = myNeuralNet10by3(testSet, trainSet);
     
elseif strcmp(currentAlgorithm, 'ABE0') == 1
    algorithmResult = ABE010by3(testSet, trainSet, currentPreProcessor);
     
elseif strcmp(currentAlgorithm, 'TEAK') == 1
    algorithmResult = TEAK(testSet, trainSet, currentPreProcessor);
     
else
    fprintf('ERROR: NO ALGORITHM WAS SELECTED TO EXECUTE!\n');
end



if (sum(isnan(algorithmResult)) ~= 0) || (sum(isinf(algorithmResult)) ~= 0)
    problem = 1;
end

end