当前位置:网站首页>[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)
边栏推荐
- Multithreading and high concurrency IV: varhandle, strong weak virtual reference and ThreadLocal
- Genicam gentl standard ver1.5 (2)
- Recommended by Alibaba P8, Fiddler packet capturing tool (I)
- Single responsibility principle
- 02 mongodb data types, important concepts and common shell instructions
- Une seule pile dans l'ordre inverse avec des fonctions récursives et des opérations de pile
- Difference between curdate() and now()
- 易周金融 | Q1手机银行活跃用户规模6.5亿;理财子公司布局新兴领域
- 一文详解|增长那些事儿
- Design a stack with getmin function
猜你喜欢
云厂商为什么都在冲这个KPI?
Matlab exercises -- routine operation of matrix
RT thread bidirectional linked list (learning notes)
Uncover the mystery of SSL and learn how to protect data with SSL
Reading notes of top performance version 2 (II) -- Performance observation tool
@Several scenarios of transactional failure
Are the two flame retardant standards of European furniture en 597-1 and en 597-2 the same?
Matlab exercises -- exercises related to symbolic operation
Annual comprehensive analysis of China's audio market in 2022
Secouer le son et se battre ~ prêter attention au blogueur
随机推荐
Array method
Reading notes of top performance version 2 (II) -- Performance observation tool
Bitlock recovery occurs in win 10, and the blue screen error code is 0x1600007e
Meichuang was selected into the list of "2022 CCIA top 50 Chinese network security competitiveness"
RT-Thread 双向链表(学习笔记)
Web3来临时的风口浪尖
Problems with cat and dog queues
If mysqlcdc sets multiple parallelism, will the incremental data repeat?
Analyse complète annuelle du marché chinois de l'audio en 2022
Has any boss ever seen repeated binlog messages when MySQL CDC uses datastream
一文详解|增长那些事儿
Introduction notes to machine learning
inherit
2022年中國音頻市場年度綜合分析
@Several scenarios of transactional failure
【Linux】【Mysql】ERROR 1698 (28000): Access denied for user ‘root‘@‘localhost‘
Meichuang data security management platform has obtained the evaluation certificate of "data security product capability verification plan" of the Institute
[proteus simulation] timer 1 external counting interrupt
RT thread bidirectional linked list (learning notes)
Establishment of SSH Framework (Part 2)