The nuclear equation of state cannot be directly measured in the heavy-ion collision experiments; it is usually inferred from the comparison between transport model simulations and experimental measurements. The in-medium correction factor (F , which is defined as the ratio of the cross section in the nuclear medium to that in free space) on the nucleon-nucleon elastic cross section is one of the important inputs of the transport model, and its magnitude is still debated. The advent of Machine Learning (ML) has profoundly influenced the way scientists study the natural world and has provided a new paradigm that merges traditional investigation with advanced datadriven techniques. The aim of this work is to present a ML-based method to study the in-medium correction factor F . The ultra-relativistic quantum molecular dynamics (UrQMD) transport model is used to simulate 132Sn + 124Sn collisions at beam energy of 0.27 GeV/nucleon with different impact parameters. The value of F is randomly selected from 0.4 to 0.8 for the simulation of each event. Several observables simulated by the UrQMD model with different F , which are thought to be probably sensitive to the in-medium nucleon-nucleon cross sections, are fed into the LightGBM (Light Gradient Boosting Machine, which is a modern decision tree-based ML algorithm) to establish the mapping between the observables and F . The mean absolute error (MAE), which is the absolute difference between the true and the predicted F , is about 0.080 and 0.021 by using event-by-event and 40-event summed observables, respectively. It indicates that ML can recognize information about the F factor. Furthermore, according to the results of Shapley Additive exPlanations (SHAP), an interpretability analysis method in ML, features that have the greatest effect on the F are identified. ML combined with the transport model may open a new venue to study the F factor. In addition, the interpretability analysis of the ML algorithm may also offer valuable insights for subsequent research.