Predominant polarity determination from a machine learning approach