Similar Items: Mathematics for machine learning