Title: **L4_1** Download

- Category:
**Other systems**- Platform:
**Python**- File Size:
- 1024
- Update:
- 2020-10-14
- Downloads:
- 0
- Uploaded by:
- zilong1999

Description: **a) Generate the sum of two datasets with 200 two-dimensional vectors (Note: before generating the dataset, it is better to initialize the Gaussian random generator to 0 (or any given value) with the command randn ("seed", 0), which is important for the repeatability of the results). The first half of the vector comes from the normal distribution of the mean vector and the covariance matrix. The second half of the vector comes from the normal distribution of the mean vector and the covariance matrix. Where is a 2 * 2 identity matrix.
(b) On the above datasets, and belong to + 1 and - 1 classes respectively. Please randomly select 150 samples from each of the above data sets as the training set, use the logistic regression algorithm to get the classification surface, and then classify the remaining 50 samples, draw the test samples and their classification surface, count the error rate, and give the probability value of each sample belonging to this category.**

文件名 | 大小 | 更新时间 |
---|---|---|

L4_1.py | 2928 | 2020-04-20 |

“CodeBus” is the largest source code store in internet!

1999-2018 **CodeBus** All Rights Reserved.