Code for different ML algorithms.