added train and predict functions to ml