function [P]=phychecalculate(positive,negative,label)
load aaindex2.mat
sample=[positive;negative];
num=size(sample,1);
D=size(sample,2);
letter=['A','R','N','D','C','Q','E','G','H','I','L','K','M','F','P','S','T','W','Y','V'];
n=size(aaindex1,1);
fitness=[];
for i=1:n
    aar=[];
    for j=1:num
        temp=[];
        for k=1:D
            index=find(letter(1,:)==sample(j,k));
            if ~isempty(index)
                temp=[temp aaindex1(i,index)];
            else
                temp=[temp 0];
            end
        end
        aar=[aar;temp];
    end
    auc = plotrocs(label, aar ,'-v 10');
    fitness=[fitness auc];
end
[result index]=sort(fitness,'descend');
phy=index;



num=size(positive,1);
m=size(negative,1);
D=size(positive,2);
threod=20;
letter=['A','R','N','D','C','Q','E','G','H','I','L','K','M','F','P','S','T','W','Y','V'];
P=[];
for i=1:threod
    aar=[];
    for j=1:num
        temp=[];
        for k=1:D
            index=find(letter(1,:)==positive(j,k));
            if ~isempty(index)
                temp=[temp aaindex1(phy(1,i),index)];
            else
                temp=[temp 0];
            end
        end
        aar=[aar;temp];
    end
    for j=1:m
        temp=[];
        for k=1:D
            index=find(letter(1,:)==negative(j,k));
            if ~isempty(index)
                temp=[temp aaindex1(phy(1,i),index)];
            else
                temp=[temp 0];
            end
        end
        aar=[aar;temp];
    end
   P(:,:,i)=aar;
end