Application of machine learning to gas flaring