load data
patterns=data(1:148,1:250);
targets=data(149,1:250);
dim = size(patterns,1);
[MIN,I] = min(patterns,[],2);
[MAX,I] = max(patterns,[],2);
for n=1:dim
    if (MAX(n)-MIN(n))==0
        patterns(n,:)=0;
    else
        patterns(n,:) = (patterns(n,:)-MIN(n))/(MAX(n)-MIN(n));
    end
end

distance='block';
tmax=100;
plotfigure=1;
sigma=[0.05,0.1,0.25,0.5,1,2,];
lambda=[0.05,0.1,0.25,0.5,1,2,10];
e=1;i=1;
for s=sigma;
    h = waitbar(0,'1','Name',sprintf('Checking s value %2d of value range %2d',i,length(sigma)));
        j=1;
        for l=lambda;
        waitbar(s/length(lambda));
        [Weight, tElapsed] = IMRelief_Sigmoid_FastImple(patterns,...
           targets, distance, s, l, tmax, plotfigure);
          Z(:,e)=Weight';
          close(gcf)
          e=e+1;
          j=j+1;
          save ('weights.mat','Z')
        %xlswrite('Weights euclidean.xlsx',Z)
        end
        i=i+1;
     close(h)
end

