where one needs to calculate the derivatives of the dipole matrix elements ∇µ l γν (R) for l = x, y, z. Unfortunately, these derivatives are not implemented for most of the electronic structure methods. We address this theoretical challenge using a machine learning model based on the Kernel ridge regression (KRR) method in this work, which will be extensively discussed in Sec. 2.4.