Model each diabetes group as a Gaussian cloud with its own centre, and classify a patient to the group with the largest posterior probability. With one covariance matrix shared by all groups (LDA) the boundaries are straight lines; with one per group (QDA) they are conics. Change the variables, the method and the class priors, and compare the error on the training data with the honest leave-one-out error.
lda prints (Filling the gap 12.2).code/ch12_supervised_learning.R (Figures 12.5 to 12.7).