For a fiber optic gyroscope, thermal deformation of the fiber coil can introduce additional ther-mal-induced phase errors, commonly referred to as thermal errors. Thermal error compensation techniques are effective means of addressing this issue. The principle behind these techniques involves real-time sensing of thermal errors and correcting them within the output signal. Since it is challenging to directly separate thermal errors from the output signal of the fiber optic gyro-scope, it is necessary to predict thermal errors based on temperature. To establish a mathematical model between temperature and thermal errors, this paper measured synchronized data of phase errors and angular velocity for the fiber coil under different temperature conditions and aimed to model it using data-driven methods. Due to the difficulty of conducting tests and the limited number of data samples, an algorithm called TD-model modeling is proposed to address the issue of overfitting, which can reduce the model's generalization ability. First, a theoretical analysis of the phase errors caused by thermal deformation of the fiber coil is performed. Subsequently, the critical parameters, such as the thermal expansion coefficient, are determined, and a theoretical model is established. Finally, the theoretical analysis model is incorporated as a regularization term and combined with the test data to jointly participate in the regression of model coefficients. Through experimental comparative analysis, it is shown that, relative to ordinary regression models, the TD-model effectively mitigates overfitting caused by the limited number of samples, leading to a 58% improvement in predictive accuracy.