At present, the number of people suffering from diabetes is increasing.
Diabetes seriously threatens people’s life and health. Therefore, it is
necessary to establish a predictive model of diabetes, assess the risk
of diabetes and provide early warning of diabetes in time. This article
focuses on machine learning combining with diabetes. Machine learning
algorithms have good accuracy and generalization ability in dealing with
complex problems. First, we analyze the risk factors of diabetes and
divide the diabetes sample set into training set and test set. Second,
the KNN (K-Nearest Neighbor) algorithm, decision tree algorithm,
Gaussian Naive Bayes algorithm, and logistic regression linear algorithm
are used to establish machine learning models. At last, experiments show
that the decision tree classification prediction model achieves the
highest accuracy 89.2%, which can better predict and analyze diabetes.