The occurrence of scorch during the production of flexible polyurethane is a significant issue that negatively impacts foam products' resilience and generally jeopardizes their integrity. The likelihood of foam product failure can be decreased by optimizing production variables based on machine learning algorithms used to predict the occurrence of scorch. Investigating technology is required because prevention is the best approach to dealing with this problem. Hence, machine learning algorithms were trained to predict the occurrence of scorch using the thermodynamic profile of polyurethane foam, which is made up of recorded production variables. A variety of heuristics algorithms were trained and assessed for how well they performed, namely XGBoost, Decision trees, Random Forest, K-nearest neighbors, Naive Bayes, Support Vector Machines, and Logistic Regression. The XGboost ensemble was found to perform best. It outperformed others with an accuracy of 98.3% (i.e., 0.983), followed by logistic regression, decision tree, random forest, K-nearest neighbors, and naïve Bayes, yielding a training accuracy of 88.1%, 66.7%, 84.2%, 87.5%, and 67.5% respectively. The XGBoost was finally used, yielding 2-distinct cases of non(occurrence) of scorch. Ensemble demonstrates that it is quite capable and is an effective way to predict the occurrence of scorch.