文件名称:L2_1
介绍说明--下载内容来自于网络,使用问题请自行百度
编写一个名为Perce的函数,用它来实现感知器算法。
函数的输入/输出有:
(a)一个N*d维的矩阵X,它的第i行是第i个数据向量;
(b)一个N维列向量y,y的第i个元素包含了类(-1,1),并且该类与相应的向量相互对应;
(c)用向量w_ini初始化参数向量;并且返回估计参数向量;
假设函数最大迭代次数为10000。(Write a function called Perce to implement perceptron algorithm.
The input / output of the function are:
(a) An n * d-dimensional matrix X whose I th row is the I th data vector;
(b) The first element of an n-dimensional column vector y, y contains a class (- 1,1), and the class corresponds to the corresponding vector;
(c) Use the vector W_ Ini initializes the parameter vector and returns the estimated parameter vector;
Suppose that the maximum number of iterations of the function is 10000.)
函数的输入/输出有:
(a)一个N*d维的矩阵X,它的第i行是第i个数据向量;
(b)一个N维列向量y,y的第i个元素包含了类(-1,1),并且该类与相应的向量相互对应;
(c)用向量w_ini初始化参数向量;并且返回估计参数向量;
假设函数最大迭代次数为10000。(Write a function called Perce to implement perceptron algorithm.
The input / output of the function are:
(a) An n * d-dimensional matrix X whose I th row is the I th data vector;
(b) The first element of an n-dimensional column vector y, y contains a class (- 1,1), and the class corresponds to the corresponding vector;
(c) Use the vector W_ Ini initializes the parameter vector and returns the estimated parameter vector;
Suppose that the maximum number of iterations of the function is 10000.)
相关搜索: 感知器算法
(系统自动生成,下载前可以参看下载内容)
下载文件列表
文件名 | 大小 | 更新时间 |
---|---|---|
L2_1.py | 2068 | 2020-04-20 |
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.