# Pattern-Classification-2nd-CH2 **Repository Path**: TuLudong/Pattern-Classification-2nd-CH2 ## Basic Information - **Project Name**: Pattern-Classification-2nd-CH2 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-08 - **Last Updated**: 2024-10-08 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Pattern-Classification-2nd-CH2 ### The repository contains the code of 《Pattern Classification》2nd Chapter2. ### Please refer to the blog (https://blog.csdn.net/lkj345/article/details/50480317) for more details. Bhattacharyya.m: Find the Bhattacharyya bound given means and covariances of single gaussian distributions. CH2.mat: CH2 data. CH2_1_a.m: Generate random vectors from the multivariate normal distribution. CH2_1_a_test.m: Generate two normal distributions and plot. ![CH2_1_a_test](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_1_a_test.png) CH2_1_b.m: Discriminant function of a normal distribution given prior probability. CH2_1_c.m: Calculate the Euclidean distance between two vectors. CH2_1_d.m: Calculate the Mahalanobis distance of a vector. CH2_2.m: Generate classification model of two classes, then calculate the classification error and the Bhattacharyya bound. CH2_2_test.m: Plot classification error and Bhattacharyya bound. ![CH2_2_test](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_2_test.png) CH2_3.m: Plot classification error and Bhattacharyya bound. ![CH2_3](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_3.png) CH2_4.m: Calculate the Mahalanobis distance with three classes, then classify the vectors. CH2_4_test.m: Test CH2_4.m with four vectors. CH2_5.m: The script is to prove that the average of a large number of independent random variables follows Gauss distribution. ![CH2_5](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_5.png) CH2_6.m: Calculate the classification error of two classes. CH2_6_test.m: Test CH2_6.m. ![CH2_6_test_1](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_6_test_1.png) ![CH2_6_test_2](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_6_test_2.png) CH2_7.m: Calculate the Bhattacharyya bound, estimated error and a series of classification error of two Gauss distribution. CH2_7_test.m: Test CH2_7.m. ![CH2_7_test_1](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_7_test_1.png) ![CH2_7_test_2](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_7_test_2.png) CH2_8_a.m: Test CH2_7.m with two Gauss distribution. ![CH2_8_a_1](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_8_a_1.png) ![CH2_8_a_2](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_8_a_2.png) CH2_8_b.m: Test CH2_7.m with two Gauss distribution. ![CH2_8_b_1](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_8_b_1.png) ![CH2_8_b_2](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_8_b_2.png) CH2_8_c.m: Test CH2_7.m with two Gauss distribution. ![CH2_8_c_1](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_8_c_1.png) ![CH2_8_c_2](https://github.com/chensonglu/Pattern-Classification-2nd-CH2/blob/master/CH2_8_c_2.png) Chernoff.m: Find the Chernoff bound given means and covariances of single gaussian distributions.