![]() |
如何使用感知器MATLAB的输出绘制分隔2个类的线
[URL="https://stackoverflow.com/questions/4882367/implementing-and-ploting-a-perceptron-in-matlab"]在Matlab中[/URL]运行[URL="https://stackoverflow.com/questions/4882367/implementing-and-ploting-a-perceptron-in-matlab"]感知器代码后,[/URL]我得到以下权重:
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') [LIST][*]计算值的正确方法(用于绘图)是否正确?[*]如何画线?任何例子吗?[/LIST] [B]回答:[/B] 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; 似乎适用于二维 [url=https://stackoverflow.com/questions/4911861]更多&回答...[/url] |
所有时间均为北京时间。现在的时间是 03:00。 |
Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.