The molecular energy, which is the sum of all eigenvalues, is crucial in determining the total π-electron energy of conjugated hydrocarbon molecules. We used machine learning techniques to calculate the energy, inertia, nullity, signature, and Estrada index of molecular graphs for bismuth tri-iodide and benzene rings embedded in P-type surfaces within 2D networks. We applied MATLAB to extract the actual eigenvalues from the data and developed general equations for these molecular properties. We then used these equations to estimate the values and compared them to the actual values through graphical analysis. Our results demonstrate the potential of data-driven techniques in predicting molecular properties and enhancing our understanding of spectral theory.