在Matlab中运行
感知器代码后,我得到以下权重:
result= 2.5799 2.8557 4.4244 -4.3156 1.6835 -4.0208 26.5955 -12.5730 11.5000 如果我从这些权重开始:
w = [ 1 1 1 1 1 1 1 1 1]'; 如何绘制将2个类分开的线。解决线性系统是必须的,但是如何?
Line = [result,w] % solve the linear system, am I correct doing this? rref(Line')
- 计算值的正确方法(用于绘图)是否正确?
- 如何画线?任何例子吗?
回答:
Yaux = sign(w'*X); % w is the result of calling perceptron scatter(X(1,:),X(2,:),100,Yaux); hold on; plot([0 w(1)], [0 w(2)]); hold off; 似乎适用于二维
更多&回答...