Algorithm CF-M: Calculating the similarity between users
begin
 get ;
= size , = size ;
 parameter ;
 preference degree ;
 range of the rating score ;
= , = sum , = sum ;
 for
  for
    ;
   for
     ,
   end
    ;
    ;
  end
 end
End
Pseudocode 1