A real-time iterative machine learning approach for temperature profile prediction in additive manufacturing processes