A machine learning based approach to melting layer detection