In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article Xiaobian for you to introduce in detail "what is the method of nonlinear function fitting of matlab BP neural network", the content is detailed, the steps are clear, and the details are handled properly. I hope that this article "what is the method of nonlinear function fitting of matlab BP neural network" can help you solve your doubts.
Some complex nonlinear systems are often encountered in engineering applications, and the state equations of these systems are complex, so it is difficult to model accurately by mathematical methods. In this case, a BP neural network can be established to express these nonlinear systems. In this method, the unknown system is regarded as a black box. Firstly, the BP neural network is trained with the system input and output data, so that the network can express the unknown function, and then the trained BP neural network can be used to predict the system output.
% clear environment variables
Clc
Clear
%% training data prediction data extraction and normalization
Download input and output data
Load data input output
% randomly sorted from 1 to 2000
K=rand (1JI 2000)
[mmaine n] = sort (k)
% find training data and forecast data
Input_train=input (n (1 1900),:)'
Output_train=output (n (1 1900))
Input_test=input (n (1901 2000),:)'
Output_test=output (n (1901 2000))
% selected sample input and output data normalization
[inputn,inputps] = mapminmax (input_train)
[outputn,outputps] = mapminmax (output_train)
%% BP network training
Initialize network structure
Net=newff (inputn,outputn,5)
Net.trainParam.epochs=100
Net.trainParam.lr=0.1
Net.trainParam.goal=0.00004
% Network training
Net=train (net,inputn,outputn)
% BP Network Forecast
% prediction data normalization
Inputn_test=mapminmax ('apply',input_test,inputps)
% network forecast output
An=sim (net,inputn_test)
% network output is de-normalized
BPoutput=mapminmax ('reverse',an,outputps)
%% result analysis
Figure (1)
Plot (BPoutput,':og')
Hold on
Plot (output_test,'-*')
Legend ('predicted output', 'expected output')
Title ('BP network prediction output', 'fontsize',12)
Ylabel ('function output', 'fontsize',12)
Xlabel ('sample', 'fontsize',12)
% prediction error
Error=BPoutput-output_test
Figure (2)
Plot (error,'-*')
Title ('BP network prediction error', 'fontsize',12)
Ylabel ('error', 'fontsize',12)
Xlabel ('sample', 'fontsize',12)
Figure (3)
Plot ((output_test-BPoutput). / BPoutput,'-*')
Title ('neural network prediction error percentage')
Errorsum=sum (abs (error))
After reading this, the article "what is the method of nonlinear function fitting of matlab BP neural network" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, you are welcome to follow the industry information channel.
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.