print (cutvalue ",cutval #plot np where (pout == [ xblue xmat[ np where (pout == [ xred xmat[ plt scatter xblue [, xblue [, ="blue"plt scatter (xred [, xred [, ="red"cutvalue figure division of the data in figure into two clustersvia the cross-entropy method principal component analysis (pcathe main idea of principal component analysis (pcais to reduce the dimensionality of data set consisting of many variables pca is feature reduction (or feature extractionmechanismthat helps us to handle high-dimensional data with more features than is convenient to interpret principal component analysis motivationprincipal axes of an ellipsoid consider -dimensional normal distribution with mean vector and covariance matrix the corresponding pdf (see ( )is ( - ( ) | rd if we were to draw many iid samples from this pdfthe points would roughly have an ellipsoid patternas illustrated in figure and correspond to the contours of sets of