当前位置:网站首页>[Matlab bp regression prediction] GA Optimized BP regression prediction (including comparison before optimization) [including source code 1901]
[Matlab bp regression prediction] GA Optimized BP regression prediction (including comparison before optimization) [including source code 1901]
2022-06-28 04:29:00 【Matlab fo Nu Tang Lian】
One 、 Code run video ( Bili, Bili )
Two 、 Introduction to relevant technical principles
1 BP Principle of neural network
Back propagation (Back Propagation,BP) Neural network is applied to 1986 Year by year Rumelhart and McCelland The team of scientists led by Mr , It is a multilayer feedforward neural network trained by error back propagation algorithm .BP Neural network can learn and store a large number of input and output mode mapping relations , There is no need to reveal the mathematical equation describing this mapping relationship in advance . The learning rule is to use the steepest descent method , The weights and thresholds of the network are continuously adjusted through back propagation , Thus, the sum of square errors of the network is minimized .BP The topological structure of neural network can be divided into 3 layer , It's the input layer 、 Hidden layer and output layer . among , The formula for calculating the number of neurons in the hidden layer is :
In style :m Is the number of input layer nodes ,n Is the number of output layer nodes ,a Usually take 1~10 The whole number inside . The more hidden layers , The smaller the error range .
2 Genetic optimization algorithm
Genetic algorithm is a computational model that simulates the biological evolution process such as natural selection and genetic mechanism in Darwin's theory of biological evolution , It is a method to search the optimal solution by simulating the natural evolution process . basis BP Topology of neural networks , Determine optimization BP The number of parameters of neural network weight threshold , Thus, the coding length of the individual in the genetic algorithm is determined , Then calculate the fitness value of the individual according to the fitness function , By choice 、 cross 、 The mutation operation obtains the optimal weight threshold .
2.1 Roulette algorithm
Roulette algorithm is proposed to prevent individuals in a group with small fitness values from being eliminated directly , The probability of each individual being selected is proportional to the value of its fitness function . The higher the fitness value , The more likely it is to be selected . Let an individual xi The fitness value of is f(xi), Then the probability of partial selection is :
The cumulative probability is :
In style :xi and xj Both represent an individual .
First , Calculate the probability of each part being selected p(xi) And cumulative probability q(xi). secondly , Randomly generate an array m, Array m The value range of the element in is [0,1]. If cumulative probability q(xi) Larger than the elements in the array m[i], Then the individual xi To be selected ; If less than m[i], Then compare the next individual xi+1, Until an individual is selected . Last , If you need to select N Individuals , Repeat the above steps N Next time .
2.2 Two point crossover algorithm
Two point crossing refers to the random setting of two crossing points in an individual chromosome , And then part of the gene exchange . First, select two intersections from the coding string , Then the two crossing points were partially crossed , After crossing, new individuals are produced , Pictured 1 Shown . among , On the left is the individual before crossing , On the right is the new individual after two points cross .
chart 1 Two point intersection example
2.3 Gauss mutation
Gaussian mutation refers to the mutation operation , Use the consistent mean as μ、 The variance of S2 The normal distribution of a random number to replace the original gene value . According to the properties of normal distribution , Gaussian mutation focuses on searching a local area near the original individual . The Gaussian probability density formula is :
among , Standard Gaussian probability density μ and S Set as 0 and 1. Gaussian mutation not only improves the optimization accuracy of the optimization algorithm , And it is helpful to jump out of the local optimal region .
3、 ... and 、matlab Edition and references
1 matlab edition
2014a
2 reference
[1] Zhangsanniu . Optimization based on genetic algorithm BP Research on prediction of Telecom Customer Churn Based on neural network [J]. Television technology . 2022,46(05)
边栏推荐
- mysql导入文本文件时的pager
- 2022年中國音頻市場年度綜合分析
- 【Linux】【Mysql】ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘
- After launching the MES system, these changes have taken place in the enterprise
- Meichuang data security management platform has obtained the evaluation certificate of "data security product capability verification plan" of the Institute
- 互联网的发展促进了无界零售、数字零售、即时零售等一系列新模式的出现
- Digital promising, easy to reach, Huawei accelerates the layout of the commercial market with "five pole" star products
- From zero to one, I will teach you to build a "search by text and map" search service (I)
- Aspnetcoreratelimit rate limit interface access limit current limit control
- The second round of free public classes of the red team is coming ~ 8:00 tomorrow night!
猜你喜欢

成长一夏 挑战赛来袭 | 学习、创作两大赛道,开启导师报名啦!

抖音实战~关注博主

Go language -select statement

Learning about DC-DC step-down chip of sy8120i (12V reduced to 3.3V)

How to write a software test report? Here comes the third party performance report template

Recommended by Alibaba P8, Fiddler packet capturing tool (I)

From zero to one, I will teach you to build a "search by text and map" search service (I)

Multithreading and high concurrency III: AQS underlying source code analysis and implementation classes

Matlab exercises -- exercises related to symbolic operation

Reading notes of top performance version 2 (II) -- CPU monitoring
随机推荐
视频爆炸时代,谁在支撑视频生态网高速运行?
After launching the MES system, these changes have taken place in the enterprise
Introduction to SQLSERVER database
有人用cdc同步到mysql发生过死锁吗?
[small program practice series] e-commerce platform source code and function implementation
flinkcdc采集oracle,oracle数据库是CDB的
MSc 307 (88) (2010 FTPC code) Part 2 smoke and toxicity test
抖音實戰~關注博主
Sorting from one stack to another
仅用递归函数和栈操作逆序一个栈
Go语言学习教程(十四)
Has any boss ever seen repeated binlog messages when MySQL CDC uses datastream
How to apply for ASTM E108 flame retardant test for photovoltaic panels?
揭开SSL的神秘面纱,了解如何用SSL保护数据
Building a server monitoring platform with telegraf influxdb grafana
01 overview, application scenarios, Download methods, connection methods and development history of mongodb
如何遍历collections.OrderedDict,服了又忘记items
03 summary of various additions, updates and deletions of mongodb documents
成长一夏 挑战赛来袭 | 学习、创作两大赛道,开启导师报名啦!
Win10 how to delete the large file hiberfil sys