Each class is a bivariate normal with unit variances; you choose the two correlations. When they are equal the Bayes boundary is a straight line and LDA, which assumes a common covariance, estimates it with few parameters. When they differ the Bayes boundary is a conic, which only QDA can follow, but QDA pays for its extra parameters with variance when the sample is small. Naive Bayes ignores the correlations altogether, and logistic regression fits a straight line without any distributional assumption. The test error of every method is measured on 10,000 fresh points; the Bayes error is the best any method can achieve.
Class means are −s(1, 0.4) and s(1, 0.4). LDA uses the pooled covariance (divisor n1 + n2 − 2), QDA one covariance per class (divisor nk − 1), naive Bayes one normal density per class and predictor; logistic regression is fitted by Newton–Raphson. The Bayes rule uses the true means and covariances.
code/ch04_classification.py (lda_fit, qda_fit, nb_fit, logistic_fit, lda_qda_example, Figure 4.9, and scenario_data for Figures 4.11 and 4.12).