function [nwindow,topfeature]=selectWindows(Fp,Fn,SSpositive,SSnegative,phychemical,label,positive,negative,top)
fitness=[];
center=16;
psize=size(Fp,1);
nsize=size(Fn,1);
topchar=[];
pl=1;
for window=5:15
    temp=[];
    %%%%%%position scoring function%%%%%
    aar=[Fp(:,(center-window):(center+window));Fn(:,(center-window):(center+window))];
    aar=zscore(aar);
    auc = plotrocs(label, aar ,'-v 10');
    temp=[temp;auc];
    %%%%%%secondary structure%%%%%%%%%%%
    aar=[];
    for i=1:size(SSpositive,3)
        aar=[aar;SSpositive((center-window):(center+window),1,i)' SSpositive((center-window):(center+window),2,i)' SSpositive((center-window):(center+window),3,i)'];
    end
    for i=1:size(SSnegative,3)
        aar=[aar;SSnegative((center-window):(center+window),1,i)' SSnegative((center-window):(center+window),2,i)' SSnegative((center-window):(center+window),3,i)'];
    end
    aar=zscore(aar);
    auc = plotrocs(label, aar ,'-v 10');
    temp=[temp;auc];
    %%%%%%physicochemical properties%%%%
    m=size(phychemical,3);
    m=20;
    aar=[];
    for i=1:m
        aar=[aar phychemical(:,(center-window):(center+window),i)];
    end
    aar=zscore(aar);
    auc = plotrocs(label, aar ,'-v 10');
    temp=[temp;auc];
    %%%%%CKSSP%%%%%%%%%%%%%%%%%%%%%%%%%
    [pCK,nCK,topfeature]=CKSSPselect(window,top,label,positive,negative);
    topfeature
    topchar(pl).feature=topfeature;
    pl=pl+1;
%     [pCK,nCK]=CKSAAPgenerate(positive,negative,topfeature,window);
    aar=[pCK;nCK];
    aar=zscore(aar);
    auc = plotrocs(label, aar ,'-v 10')
    temp=[temp;auc];
    fitness=[fitness temp];
end
window=5:15;
nwindow=[];
for i=1:size(fitness,1)
    index=find(fitness(i,:)==max(fitness(i,:)));
    nwindow=[nwindow window(index)];
end
topfeature=topchar(nwindow(1,4)-4).feature;
% save('fitness.mat','fitness');
       