A machine learning algorithm is presented, serving as a data-driven modeling tool for wall-modeled large eddy simulations (WMLESs). The proposed model is formulated to address the problems of log layer mismatch and inaccurate prediction of skin friction, particularly for supersonic separated and reattached flows. This machine learning algorithm uses random forest regression to map the local mean flow fields to the discrepancies in the skin friction (heat flux) while complying with Galilean invariance as the flow features input is provided using relative velocities. The model is tested on two different supersonic flows, namely, flow over a flat plate and flow around an expansion-compression corner. The performance is evaluated by comparing the skin friction (heat flux) and flow properties with exact values. The ultimate goal is to build a robust and generalizable machine learning model to improve the prediction of WMLES of supersonic flows. To this end, the model is trained by a set of flows containing some essential flow physics to devise a generalizable model. Although the general machine learning model shows some advantages over the baseline WMLES model, it is concluded the data set is far from being representative of the rich flow physics model; therefore, the machine learning model should be trained and tested by a broader set of flows.