function [reducedDataset] = mySFS(dataset)

X = dataset(:,1:(size(dataset,2)-1));
y = dataset(:,size(dataset,2));

c = cvpartition(y,'k',10);
fun = @(XT,yT,Xt,yt)...
    (sum(abs(yt - abs(Xt*regress(yT,XT))).^2));

[fs,history] = sequentialfs(fun,X,y,'cv',c);

% now we have the selected features in fs
reducedDataset = [];
for i = 1:(size(dataset,2)-1)
    if fs(i) == 1    % if the feature is selected
        reducedDataset = [reducedDataset,dataset(:,i)];
    end
end

% append the effort column
reducedDataset = [reducedDataset,dataset(:,size(dataset,2))];

end