文件名称: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 |
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。