This paper presents a temperature sensor placement methodology for the thermal compensation of the tool center point of a machine tool. The methodology consisted of two phases: ranking and screening. With multiple temperature sensors attached to a targeted machine tool, principal component analysis and then principal component regression were employed to rank temperature sensors in phase I. In phase II, the temperature sensors, after they had been ranked in phase I, were screened using singular value decomposition to eliminate redundant sensors, which exhibited high collinearity to other sensors. Spindle thermal compensation was performed on a 3-axis machining center using conventional multiple regression (MR), back propagation neural network (BPNN), and random forest (RF). With only four sensors selected from 16 sensors, the results revealed that through the proposed ranking and screening processes, the accuracy levels of the thermal compensation models from MR, BPNN, and RF were all higher than those of models without ranking or screening. Accuracy improved in both BPNN and RF more than 40% from those using sensor ranking only. The compensation performance with only four sensors was even better than that with six sensors selected using importance from RF. Moreover, how to determine optimal sensor quantity was presented. This proposed methodology of spindle thermal compensation could be more cost effective in terms of lower numbers of sensors but with higher thermal compensation accuracy.