calculate similarity

machine learning in action