文件名称:L4_1
- 所属分类:
- 其他小程序
- 资源属性:
- 上传时间:
- 2020-10-16
- 文件大小:
- 1kb
- 下载次数:
- 0次
- 提 供 者:
- zilon*****
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
a)产生两个都具有200个二维向量的数据集和(注意:在生成数据集之前最好使用命令randn(‘seed’,0)初始化高斯随机生成器为0(或任意给定数值),这对结果的可重复性很重要)。向量的前半部分来自均值向量的正态分布,并且协方差矩阵。向量的后半部分来自均值向量的正态分布,并且协方差矩阵。其中是一个2*2的单位矩阵。
(b)在上述数据集上和分别属于+1类和-1类,请在上述数据集的两类中各随机抽取150个样本作为训练集,运用Logistic regression算法得到的分类面,然后对余下的各50个样本进行分类,画出测试样本及其分类面,统计错误率,给出每个样本属于该类别的概率值。(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.)
(b)在上述数据集上和分别属于+1类和-1类,请在上述数据集的两类中各随机抽取150个样本作为训练集,运用Logistic regression算法得到的分类面,然后对余下的各50个样本进行分类,画出测试样本及其分类面,统计错误率,给出每个样本属于该类别的概率值。(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 |