Write machine learning algorithms with Python