Transformer is an indispensable equipment in the power system, and its normal operation plays a vital role in the stable operation of the power system and power quality. However, due to the complexity of the working environment of the transformer, its internal structure is also more complex, so the transformer failure frequency is higher. Therefore, timely detection and early warning of transformer failure is of great importance. In this paper, a machine learning algorithm is introduced to automatically discover the laws and patterns in the data by learning and analysing a large amount of data, and use these laws and patterns to make predictions and decisions. In this paper, the winding temperature indicator, oil temperature indicator alarm, oil temperature indicator trip and magnetic oil level indicator are taken as the target variables, and the current and voltage parameters are taken as the input variables, and the dataset is divided into training set, validation set and test set according to the ratio of 6:2: 2. The dataset is divided into training set, validation set and test set, and 12 kinds of machine learning models are introduced to predict the winding temperature indicator, the oil temperature indicator alarm, the oil temperature indicator trip, and the magnetic oil level indicator, respectively. indicator alarm, oil temperature indicator trip, and magnetic oil level indicator values, respectively, to observe the operating status of the transformer in real time by predicting the transformer state parameters. The results show that the machine learning model has high application value in transformer condition monitoring. Through the input of current and voltage parameters, the machine learning model can accurately predict and monitor the important indicators of the transformer, and discover the abnormal state of the transformer in time, so as to ensure the safe operation of the transformer. In the prediction of winding temperature, oil temperature and oil temperature indicator tripping, the prediction accuracy of the 12 machine learning models reaches more than 85%, and the prediction accuracy of some models even reaches 100%. For magnetic oil level prediction, the prediction accuracy of the 12 machine learning models is more than 90%. These results show that the machine learning models have high accuracy and stability and can provide reliable technical support for transformer fault detection. In summary, machine learning algorithms have high application value in transformer fault detection, which can automatically discover the laws and patterns in the data by learning and analysing a large amount of data, and use these laws and patterns to make predictions and decisions.