In engineering practice, the collection of equipment vibration signals is prone to interference from the external environment, resulting in abnormal data and imbalanced data in different states. Traditional support vector machine (SVM), support matrix machine (SMM) and other methods have advantages in balancing sample classification, but have limitations in obtaining low rank information, making it difficult to perform classification tasks under data imbalance. Therefore, a novel classification method that targets matrices as the input, called flexible dynamic matrix machine (FDMM), is proposed in this paper. First, FDMM establishes a regularization term using a flexible low-rank operator and sparse constrain, which can better take into account matrix structure information. Then, the upper bound of the loss function is truncated, reducing the impact of the loss on the construction of the decision hyperplane. Finally, the recognition performance of imbalanced data is improved by adjusting the game values of different categories of samples through dynamic adjustment function. Experimental results demonstrate that superior classification accuracy and generalization performance can be achieved with the FDMM method when applied to two roller bearing datasets.