we used the following python code to make this figure ldamixture py import numpy as np matplotlib pyplot as plt from scipy stats import multivariate_normal from mpl_toolkits mplot import axes from matplotlib colors import lightsource mu mu np array ([ , ]np array ([ , ]sigma np array ([[ , ,[ ]]xy np mgrid - : : - : : jmvn multivariate_normal mu sigma mvn multivariate_normal mu sigma xy np hstack (( reshape - , , reshape - , )) mvn pdf(xyreshape ( shape mvn pdf(xyreshape ( shape fig plt figure (ax fig gcaprojection =' 'ls lightsource azdeg = altdeg = cols ls shade (zplt cm winter surf ax plot_surface (xyzrstride = cstride = linewidth = antialiased =false facecolors =colsplt show (the following python codewhich imports the previous codedraws contour plot of the mixture densitysimulates data points from the mixture densityand draws the decision boundary to compute and display the linear decision boundarylet [ ] - ( and > - > - thenthe decision boundary can be written as orequivalentlyx -( )/ we see in figure that the decision boundary nicely separates the two modes of the mixture density lda py from ldamixture import from numpy random import rand from numpy linalg import inv fig plt figure (plt contourf (xy,zcmap=plt cm blues alpha extend ='both 'plt ylim - , plt xlim - , (rand( , for in range ( , )if [ ] np random multivariate_normal (mu ,sigma , plt plot( [ ][ , [ ][ ',alpha elseu np random multivariate_normal (mu ,sigma , plt plot( [ ][ , [ ][ '+ ',alpha