Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use matlab Linear Neural Network

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to use MATLAB linear neural network". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Linear neural network is the simplest kind of neural network, which can be composed of one or more linear neurons. The difference between the linear neural network and the perceptron is that the neuron transfer function of the linear neural network is a linear function, so the output of the linear neural network can take any value, while the output of the perceptron can only be 0 or 1. Linear neural network has higher convergence speed and accuracy than perceptron, but like perceptron, linear neural network can only solve the problem of linear separation. Each input of the perceptron has an output corresponding to it. Referring to the difference between the output vector and the expected output vector, the weights and thresholds of the network are adjusted so that the sum of squares of the training error is minimum or less than a certain value. This learning rule is the Widrow-Hoff learning rule, which is called LMS (Least Mean Square) algorithm. % define variable

% input vector d = [0mem0mem0re0];% expected output vector lr=maxlinlr;% maximum learning rate%% linear network implementation based on input matrix.

Net1=linearlayer (0primel);% create linear network net1=train (net1,P,d);% Linear network training% Perceptron implementation net2=newp ([- 1meme 1 maverick 1], 1memento hardlim');% create perceptron net2=train (net2,P,d);% Perceptron learning

%% display plot ([0recorder 1], [0flore 1],'o');% output hold on;plot from graphics window (1 minus 1],'o');% display y2=-w2 (1) / w2 (2) * x-w1 (3) / w1 (2);% 1 peg 2 is the threshold plot to distinguish between 0 and 1; y2=-w2 (1) / w2 (2) * x-w2 (3) / w2 (2) The% hardlim function outputs 0 or 1plot, respectively, with 0 as the threshold; axis ([- 0.5 meme 2 meme le le 2]) xlabel ('x'); ylabel ('ylabel'); title (' linear neural networks and perceptrons for solving and logic') legend ('linear neural network classification surface', 'perceptron classification surface')

This is the end of the content of "how to use MATLAB Linear Neural Network". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 243

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report