PA4 - rank by machine learning