In this paper, the optimal choice of the interior penalty parameter of the discontinuous Galerkin finite element methods for both the elliptic problems and the Biots systems are studied by utilizing the neural network and machine learning. It is crucial to choose the optimal interior penalty parameter, which is not too small or not too large for the stability, robustness, and efficiency of the numerical discretized solutions. Both linear regression and nonlinear artificial neural network methods are employed and compared using several numerical experiments to illustrate the capability of our proposed computational framework. This framework is an integral part of a developing automated numerical simulation platform because it can automatically identify the optimal interior penalty parameter. Real-time feedback could also be implemented to update and improve model accuracy on the fly.