In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the method of matlab perceptron adjustment", interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "what is the method of matlab perceptron adjustment"!
The perceptron is tuned by the mae function, which is a network performance function that measures system performance in terms of mean absolute error. Other performance functions include mse: mean square error sse: sum of squares of errors
%% clear,clcclose all%% adapt for perceptron % create perceptron net=newp ([-1,2;-2,2 $>,1);% define training vector P={[0;0] [0;1] [1;0] [1;1]};T={0,0,1,1};% adjust [net,y,ee,pf] = adapt(net,P,T);ma=mae(ee);ite=0;while ma>=0.15[net,y,ee,pf] = adapt (net,P,T,pf);ma=mae(ee);newT=sim(net,P);ite=ite+1;if ite>=10break; end %% clean clear,clcclose all%% adapt for linear networks % create linear networks net=newlin ([-1,1 $>,1,[0,1],0.5);% define training vector 1P1 ={-1,0,1,0,1,-1,0,1};T1={-1,-1,1,1,2,0,-1,-1,0,1,1};% adjust [net,y,ee,pf] = adapt (net,P1,T1);disp(mae(ee))% define training vector 2P2 ={1,-1,-1, 1,-1, 0, 0, 1,-1,-1};T2={2,0,-2, 0, 2, 0,-1, 0, 1, 0,-1};% adjust network [net,y,ee,pf] = adapt (net,P2,T2,pf);disp(mae(ee))% Train the network with all data P3=[P1,P2];T3=[T1,T2];net.adaptParam.passes=100;[net,y,ee,pf]=adapt (net,P3,T3,pf);disp(mae(ee))net=newp ([-10 10],1);% Create a perceptron with an input node and an output node p=[-10 -5 0 5 10];% Train input vector t=[0 0 1 1];% Expected output y=sim(net,p);% Direct simulation e=t-y;% Error perf=mae(e);% Mean absolute difference sum(abs(e))/length(e); % takes the absolute value and averages it, which is the same as the mae function net=train(net,p,t);
% After training, calculate the average absolute difference y=sim(net,p);e=t-y;perf=mae(e);% The average absolute difference is 0. I believe that everyone has a deeper understanding of "what is the method of adjusting matlab perceptron". Let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
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: 0
*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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.