Abstract:To solve the problem that the data under different working conditions cannot be directly trained and used for detection, a diagnosis algorithm based on transform component analysis and bag of words was proposed. For the labeled data to be used for training (called source domain data) and unlabeled data for test diagnosis (called target domain data), firstly, the two types of data were converted into frequency domain data using short-time Fourier transform. Then, the spectrum energy of the two types of data was mapped to the same distribution through transfer component analysis in order to make corresponding bag of words as a feature of the data. Finally, a suitable classifier was trained on the bag of words of the source domain data and diagnosed the target domain data with that. The experimental results under the Siemens SQI-MFS platform experimental data set, Case Western Reserve University public data set and Mechanical Failure Prevention Technology Association MFPT(machinery failure prevention technology) data set show that the algorithm is valuable.