Intelligent fault detection is an important component of the industrial and automation fields. However, conventional research on intelligent fault detection mainly focuses on industrial production equipment, while there is little research on intelligent fault detection scenarios for robots. Based on a hexapod robot joints dataset, this paper investigates intelligent fault diagnosis tasks in the field of robotics. Firstly, the dataset is clustered into two new datasets with different distributions through k-means method, which is used to simulate the practicality of imbalanced distribution between healthy and fault data. Afterwards, several multioutput machine learning classification models were established to predict robot joints with faults. In two datasets with different distributions, the larger one is used as the training set and the smaller one is used as the testing set. The article compares the performance of these models with prediction accuracy as the main indicator. And based on the results, the paper selects the model with the highest accuracy for further exploration of feature importance. Finally, the article explains the significance of the results and analyzes possible reasons. The experimental results show that the random forest model better overcomes the problem of data distribution differences and has the highest accuracy. In the random forest model, the importance of position data representing position error is higher than that of slope with respect to the axis data representing angle error. This result may be related to the distribution of feature values and the fact that position data contains more crucial information.