This work proposes a modified forward-backward splitting algorithm combining an inertial technique for solving the monotone variational inclusion problem.The weak convergence theorem is established under some suitable conditions in Hilbert space, and a new step size is presented for our algorithm to speed up the convergence. We give an example and numerical results for supporting our main theorem in infinite dimensional spaces. We also provide an application to predict breast cancer by using our proposed algorithm for updating the optimal weight in machine learning. Moreover, we use the Wisconsin original breast cancer data set as a training set to show efficiency comparing with the other three algorithms in terms of three key parameters, namely, accuracy, recall, and precision.