Thermal error significantly impacts the machining precision of machine-tools. Thermal deformations in the machine-tool structure caused by the various machine heat sources is at the origin of this phenomenon. In order to ensure the expected quality of the parts, manufacturer have to run the machine-tools for hours before start producing in order to reach the machine thermal stability. This heating phase has a high negative impact on the machine productivity on one hand and on its ecological footprint on the other. This paper presents a data-driven approach to model and predict the thermal error in order to correct the tool reference position accordingly. The automatic adjustment of tool position allows to produce parts with the expected quality and precision regardless of the thermal state of the machines, which substantially increase their productivity. For this purpose, temperature sensors as well as high precision tool position measurement instruments are deployed on a Tornos SwissNano4 machine-tool. A set of experiments are conducted to collect data related to these two measurements. Four major Machine Learning algorithms are trained using a subset of the collected data and tested with the remaining data subset. Quantitative and comparative analysis shows that three of the four algorithms have a prediction with a mean Absolute Error (MAE) below 1µm and a Correlation Coefficient higher than 90%. Even classical linear regression models are able to predict the thermal error with high accuracy. Advanced Machine Learning techniques show high potential to provide a better prediction accuracy.