rv=load('rv.txt');
hhat=load('hhat.txt');
XSnum=size(rv,1);
YSnum=size(hhat,2);
for i=1:YSnum
    hv(:,i)=rv;
end
rv=hv;
for j=1:YSnum
for i=1:XSnum
    MSE(i,j)=(rv(i,j)-hhat(i,j))^2;
    MAE(i,j)=abs(rv(i,j)-hhat(i,j));
    MSEE(i,j)=(sqrt(rv(i,j))-sqrt(hhat(i,j)))^2;
    MAEE(i,j)=abs(sqrt(rv(i,j))-sqrt(hhat(i,j)));
    HMSE(i,j)=(1-rv(i,j)/hhat(i,j))^2;
    HMAE(i,j)=abs(1-rv(i,j)/hhat(i,j));
    QLIKE(i,j)=log(hhat(i,j))+rv(i,j)/hhat(i,j);
    R2LOG(i,j)=(log(rv(i,j)/hhat(i,j)))^2;
    
end
end
MMSE=mean(MSE);
MMAE=mean(MAE);
MHMSE=mean(HMSE);
MHMAE=mean(HMAE);
MQLIKE=mean(QLIKE);
MR2LOG=mean(R2LOG);
MMSEE=mean(MSEE);
MMAEE=mean(MAEE);
MMSE=MMSE';
MMAE=MMAE';
MMSEE=MMSEE';
MMAEE=MMAEE';
MHMSE=MHMSE';
MHMAE=MHMAE';
MQLIKE=MQLIKE';
MR2LOG=MR2LOG';
