Segment Machine Learning Algorithm