The dry bean dataset of this study uses the imbalanced data set of the University of California, Irvine (UCI) machine learning warehouse platform. The dataset consists of 13,611 data points, including 16 explanatory variables and 1 target variable (Class). This paper proposes clustering and classification of dry beans based on K-means combined with machine learning methods such as decision tree (DT), random forest (RF) and support vector machine (SVM). The key idea is that K-means performs clustering first, and then imports the clustering results into DT, RF, and SVM to obtain the classification accuracy and compares it with traditional machine learning methods to improve the classification accuracy of dry bean imbalanced data. The experimental result is shown that the proposed method found K-means + SVM to have good classification accuracy on the dry bean dataset. This study further explored the 11 decision rules obtained in K-means + DT. In the ranking of explanatory variable importance in K-means + RF, it was found that the top three were Compactness, ShapeFactor3, and ShapeFactor1. Therefore, the proposed method of first clustering and then classifying can be used as an effective means to analyze dry bean imbalanced data.