CN109711549A - A kind of mastitis for milk cows detection method based on genetic algorithm optimization BP neural network - Google Patents
A kind of mastitis for milk cows detection method based on genetic algorithm optimization BP neural network Download PDFInfo
- Publication number
- CN109711549A CN109711549A CN201811609775.3A CN201811609775A CN109711549A CN 109711549 A CN109711549 A CN 109711549A CN 201811609775 A CN201811609775 A CN 201811609775A CN 109711549 A CN109711549 A CN 109711549A
- Authority
- CN
- China
- Prior art keywords
- neural network
- value
- milk
- genetic algorithm
- cow
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S10/00—Systems supporting electrical power generation, transmission or distribution
- Y04S10/50—Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
Landscapes
- Investigating Or Analyzing Materials By The Use Of Electric Means (AREA)
Abstract
The present invention relates to mastitis for milk cows detection technique fields, in particular to a kind of mastitis for milk cows detection method based on genetic algorithm optimization BP neural network.Mode input of the detection method using conductivity, temperature, pH value etc. as network, it is exported somatic number as model, construct the mastitis for milk cows detection model based on BP neural network, and optimized using weight and threshold value of the genetic algorithm to network to improve the detection accuracy of BP neural network, to establish the mastitis for milk cows detection model based on Genetic BP Neutral Network.This method only needs conductivity, pH value and the temperature by measuring milk, utilize trained model of genetic algorithm-BP artificial neural networks, it obtains more accurate somatic number and judges whether milk cow suffers from mammitis, compare present direct or indirect Somatic Cells Content detection method, cost is relatively low for this method, easy to operate, it can be achieved that on-line checking.
Description
Technical field
The present invention relates to mastitis for milk cows detection technique fields, are based on genetic algorithm optimization BP nerve net in particular to one kind
The mastitis for milk cows detection method of network.
Background technique
Mastitis for milk cows is a kind of inflammatory reaction as caused by cause pathogeny imcrobe infection breast tissue, is in milk cattle cultivating
One of most common disease.The generation of mammitis not only reduces the output of milk of milk cow, but also can cause to aquaculture very big
Economic loss.So how to be effectively detected out whether milk cow suffers from mammitis, there is very big realistic meaning.
When milk cow illness, the leukocyte count in milk cow lotion can be dramatically increased.So can be by milk cow lotion
The measurement of body cell quantity judges whether milk cow suffers from mammitis.Currently, Somatic Cell Count can be divided into direct counting method and
Indirect counting method.Nineteen forty-six, Little and Plastridge invented direct microscopic count method.Direct microscopic cell counts
Method is the standard method of body cell quantity detection, and this method accuracy is high, equipment is simple, but its drawback be exactly operate it is too cumbersome,
Heavy workload is also easy to produce visual fatigue.Indirect counting method is nineteen fifty-seven such as California mammitis detection method (CMT)
Scalm and Noorlander pioneering chemical analysis method.Under the action of CMT test solution, the lipid material in milk cell occurs
Phenomena such as emulsification, precipitating or grumeleuse occur for DNA that milk cell releases after being destroyed, according to precipitation capacity or grumeleuse number
Come estimate cell number in milk number and achieve the purpose that determine milk cow whether illness.But Indirect somatic counting method needs
Staff has experience abundant, vulnerable to subjective factor influence and can only conclude approximate range.
After milk cow suffers from mammitis, the body cell quantity of milk cow be will increase, and the conductive characteristic in milk is than normal milk cow
The conductive characteristic of milk can reinforce;In addition, the pH value of milk cow cow's milk is positively correlated with body cell quantity after illness.Conductivity
Detection method and PH detection method are although easy to operate, easy to use, and do not need extra technical support, but its detection accuracy needs
It improves, and the influence vulnerable to parity and feeding manner.
BP neural network is one of the neural network being most widely used in artificial neural network, and also referred to as error is reverse
Propagation Neural Network.Neural network is that its error is carried out backpropagation, continuously adjusts mind by the continuous training to data
Through the weight and threshold value between member, it is close to some function, to realize the solution of nonlinear problem.But BP nerve net
Easily there is the case where local extremum using the method for gradient decline in calculating process in network, furthermore in terms of Neural Network Structure Design
Mainly empirically there is very big randomness, be difficult to acquire the optimal solution of the network overall situation without the guidance of theoretical property.
Summary of the invention
The mastitis for milk cows detection method based on genetic algorithm optimization BP neural network that the object of the present invention is to provide a kind of,
Mode input of this method using conductivity, temperature, pH value etc. as network exports somatic number as model, constructs base
It optimizes in the mastitis for milk cows detection model of BP neural network, and using weight and threshold value of the genetic algorithm to network to mention
The detection accuracy of high BP neural network, to establish the mastitis for milk cows detection model based on Genetic BP Neutral Network.
To achieve the goals above, the present invention provides the following technical scheme that
A kind of mastitis for milk cows detection method based on genetic algorithm optimization BP neural network, includes the following steps:
1) it, obtains data sample: measuring four parameters of m cow's milk sample, respectively conductivity, pH value, temperature respectively
And somatic number;Wherein, with each parameter for a data dimension.
2), data prediction: using mapminmax function to four numbers of the m cow's milk sample measured in step 1
Pretreatment is normalized according to dimension, is mapped to the numerical value of each data dimension between codomain [0,1].Wherein, mapminmax
Function calculation formula such as formula 1:
Y=(ymax-ymin) * (x-xmin)/(xmax-xmin)+ymin formula 1
By data prediction, the measured value of each data dimension is obtained.
3), determine the network topology structure of single BP neural network: BP neural network includes input quantity, output quantity, input
Layer, output layer and hidden layer;Wherein, input quantity is conductivity, pH value, the temperature of cow's milk sample;Output quantity is cow's milk sample
Somatic number;Input layer, output layer and hidden layer include multiple nodes;Wherein, the number of nodes of input layer is n, output
The number of nodes of layer is q, node in hidden layer N.Wherein, the value of N is calculated according to formula 2:
Wherein, X is constant, and range is 1~10.
4), on the basis of the network topology structure determined by step 3, construct single BP neural network: building mode is letter
Number building;Wherein, the transmission function between the input layer and hidden layer of single BP neural network be tansig function, hidden layer with
Transmission function between output layer is purelin function;It constructs the obtained single BP neural network and successively carries out step 5, step
Rapid 6 and step 7.
5), training BP neural network: trainlm function is chosen as training function, randomly selects the cow's milk sample in step 2
The temperature of m1 cow's milk sample in this m, conductivity, pH value and somatic number measured value be trained as training data
It practises.
6), determine the predictive ability of BP neural network:
The temperature, conductivity, PH of remaining m2 cow's milk sample are inputted to housebroken BP neural network obtained in step 5
Value, obtains the predicted value of the somatic number of m2 cow's milk sample, the predicted value is as verify data;Wherein, m2=m-m1.
The verify data of the somatic number of m2 cow's milk sample and the measured value in step 2 are compared, by square
Root error RMSE and coefficient of determination R2Determine the predictive ability of housebroken BP neural network.Wherein, root-mean-square error RMSE and
Coefficient of determination R2Value respectively such as formula 3 and formula 4:
In formula, m is cow's milk sample size;Xi is respectively measured value and the prediction of the somatic number of each cow's milk sample
Value;For the average value of cow's milk sample somatic number predicted value.
7) step 5 and step 6, are repeated, the good BP neural network of predictive ability is obtained:
Step 5 and step 6 are repeated, number of repetition is Y times, takes wherein RMSE minimum, R2It is worth the BP nerve net closest to 1
Network is the best BP neural network of predictive ability;Wherein, the value of Y is 2~5.
8), using the initial weight of the genetic algorithm single BP neural network good to predictive ability obtained in step 7 and
Threshold optimization: the following steps are included:
A, real coding is carried out to the initial weight of BP neural network and threshold value, determines initial population.
B, the ideal adaptation angle value in initial population is calculated.
C, population number, the number of iterations are set, circulation is iterated;The iterative cycles mode are as follows: circulation selected,
The operation for intersecting, making a variation and calculating fitness value, stops when cycle-index is more than the number of iterations of setting;Selection individual
The maximum individual of fitness value is used as optimum individual.
The population number is 30~160.
The crossover probability of the intersection is Pc, and the range of Pc is 0.4~0.99.
The probability of the variation is Pm, and the range of Pm is 0.01~0.2.
D, obtained optimum individual fitness value is decomposed into the link weight and threshold value of BP neural network, is weighed with the link
Value and initial weight and threshold value of the threshold value as BP neural network;So far, genetic algorithm instructs single BP neural network
Practice optimization.
9), using the Genetic BP Neutral Network after the training optimization by step 8, step 5 is repeated to step 7, obtains one
A predictive ability is good based on genetic algorithm optimization BP neural network.
10) mastitis for milk cows, is detected based on genetic algorithm optimization BP neural network using what step 9 obtained;Pass through conductance
The numerical value of rate value, pH value and temperature can be predicted the numerical value of somatic number by the Genetic BP Neutral Network trained.
In the formula 2 of step 3, the value that the value of n is 3, q is 1;Hidden layer is single hidden layer, and the value of N is 11;In practical net
In network training process, practical node in hidden layer N ' is determined according to forecast result of model, wherein the range of N ' is [N-2, N+2].
In step 6, m1=80%m;M2=20%m.
In step 7, when carrying out step 5 every time, the m1 of selection is all different;The value of the Y is 3.
In step 8, the input layer has 3 nodes, and hidden layer has 11 nodes, and output layer has 1 node, BP nerve net
Network structure is 3-11-1;Genetic algorithm encoding length is 56.
In step 8, the number of iterations is 100 times, Pc 0.7, Pm 0.1.
Compared with prior art, the beneficial effects of the present invention are:
1) the mastitis for milk cows detection method of the invention based on genetic algorithm optimization BP neural network, it is only necessary to pass through survey
Conductivity, pH value and the temperature for measuring milk, using trained model of genetic algorithm-BP artificial neural networks to get thin to more accurate body
Born of the same parents' number judges whether milk cow suffers from mammitis, compares present direct or indirect Somatic Cells Content detection method, this method cost compared with
It is low, easy to operate, it can be achieved that on-line checking.
2) the mastitis for milk cows detection method of the invention based on genetic algorithm optimization BP neural network, comprehensively considers conductance
The influence of three rate, pH value and temperature important parameters, can relatively accurately predict somatic number, realize the efficient of mastitis for milk cows
Rate, high-precision detect.
3) the mastitis for milk cows detection method of the invention based on genetic algorithm optimization BP neural network, passes through genetic algorithm
Optimization, the disadvantage of BP neural network can be overcome well and improve the accuracy of network, calculate it better than traditional optimizing
Method is more suitable for the complicated nonlinear problem of processing.
Detailed description of the invention
Fig. 1 is the predicted value and measured value comparison diagram of single BP neural network in the embodiment of the present invention;
Fig. 2 is in the embodiment of the present invention, based on the genetic algorithm in genetic algorithm optimization BP neural network optimization process
Fitness curve graph;
Fig. 3 is to be based on genetic algorithm optimization BP neural network (GA-BP), single BP neural network in the embodiment of the present invention
The somatic number predicted value of algorithm (BP) and the comparison diagram of measured value;
Fig. 4 be the embodiment of the present invention in, single BP neural network algorithm (BP) and be based on genetic algorithm optimization BP nerve net
When network (GA-BP) measures somatic number, the comparison diagram of the error of predicted value and measured value.
Specific embodiment
Invention is further explained with reference to the accompanying drawings and examples.
A kind of mastitis for milk cows detection method based on genetic algorithm optimization BP neural network, includes the following steps:
1, obtain data sample: respectively measure m cow's milk sample four parameters, respectively conductivity, pH value, temperature and
Somatic number.Wherein, with each parameter for a data dimension.
2, data prediction: to eliminate the order of magnitude difference between each data dimension, reduce error, using mapminmax
Pretreatment is normalized to four data dimensions of the m cow's milk sample measured in step 1 in function, makes each data dimension
The numerical value of degree is mapped between codomain [0,1].Wherein, mapminmax function calculation formula such as formula 1:
Y=(ymax-ymin) * (x-xmin)/(xmax-xmin)+ymin formula 1
By data prediction, the measured value of each data dimension is obtained.
3, determine the network topology structure of single BP neural network: BP neural network includes input quantity, output quantity, input
Layer, output layer and hidden layer.Wherein, input quantity is conductivity, pH value, the temperature of cow's milk sample;Output quantity is cow's milk sample
Somatic number;Input layer, output layer and hidden layer include multiple nodes.Wherein, the number of nodes of input layer is n, output
The number of nodes of layer is q, node in hidden layer N.Wherein, the value of N is calculated according to formula 2:
Wherein, X is constant, and range is 1~10.
Preferably, the value that the value of n is 3, q is 1.
Preferably, hidden layer is single hidden layer, and the value of N is 11.
Preferably, in real network training process, practical node in hidden layer N ' can be determined according to forecast result of model,
Wherein, the range of N ' is [N-2, N+2].
4, on the basis of the network topology structure determined by step 3, construct single BP neural network: building mode is function
Building.Wherein, the transmission function between the input layer and hidden layer of single BP neural network be tansig function, hidden layer with it is defeated
The transmission function between layer is purelin function out.
It constructs the obtained single BP neural network and successively carries out step 5, step 6 and step 7.
5. training BP neural network: choosing the most fast trainlm function of convergence rate as training function, randomly select step
The measured value conduct training of the temperature, conductivity, pH value and somatic number of m1 cow's milk sample in cow's milk sample m in rapid 2
Data are trained study.
6, determine the predictive ability of BP neural network:
The temperature, conductivity, PH of remaining m2 cow's milk sample are inputted to housebroken BP neural network obtained in step 5
Three input values of value, obtain the predicted value of the somatic number of m2 cow's milk sample, the predicted value is as verify data.Wherein, m2
=m-m1.Preferably, m1=80%m;M2=20%m.
The verify data of the somatic number of m2 cow's milk sample and the measured value in step 2 are compared, by square
Root error RMSE and coefficient of determination R2To determine the predictive ability of housebroken BP neural network.
The present invention uses root-mean-square error RMSE and coefficient of determination R2Carry out the predictive ability of decision model.When model prediction energy
Power is preferable, and when the predicted value of the somatic number in each sample differs smaller with measured value, RMSE will be smaller, R2It is worth closer
In 1, root-mean-square error RMSE and coefficient of determination R2Value respectively such as formula 3 and formula 4:
In formula, m is cow's milk sample size;Xi is respectively measured value and the prediction of the somatic number of each cow's milk sample
Value;For the average value of cow's milk sample somatic number predicted value.
7. repeating step 5 and step 6, the good BP neural network of predictive ability is obtained:
Step 5 and step 6 are repeated, number of repetition is Y times, takes wherein RMSE minimum, R2It is worth the BP nerve net closest to 1
Network is the best BP neural network of predictive ability.Wherein, when carrying out step 5 every time, the m1 of selection is all different.Wherein, the value of Y
It is 2~5, preferably 3 times.
8, the initial weight and threshold of the genetic algorithm single BP neural network good to predictive ability obtained in step 7 are utilized
Value optimization: the structural parameters of genetic algorithm include the number of iterations and population number.Using genetic algorithm to single BP neural network
Initial weight and threshold value carry out global optimizing, specifically includes the following steps:
A, the initial weight to single BP neural network and threshold value carry out real coding, determine initial population.
Preferably, input layer has 3 nodes, and hidden layer has 11 nodes, and output layer has 1 node, so single BP is refreshing
It is 3-11-1 through network structure;Genetic algorithm encoding length is 3 × 11+11 × 1+11+1=56.
B, the ideal adaptation angle value in initial population is calculated.By the somatic number output valve of single BP neural network and measurement
Error Absolute Value between value is as the ideal adaptation angle value in initial population.Wherein, ideal adaptation angle value is bigger, which gets over
It is excellent.
C, population number, the number of iterations are set, circulation is iterated.The iterative cycles mode are as follows: circulation selected,
The operation for intersecting, making a variation and calculating fitness value, stops when cycle-index is more than the number of iterations of setting.Selection individual
The maximum individual of fitness value is used as optimum individual.
The population number is 30~160.
Preferably, the number of iterations is 100 times.
The crossover probability of the intersection is Pc, and the range of Pc is 0.4~0.99.Preferably, 0.7 Pc.
The probability of the variation is Pm, and the range of Pm is 0.01~0.2.Preferably, 0.1 Pm.
D, obtained optimum individual fitness value is decomposed into the link weight and threshold value of BP neural network, is weighed with the link
Value and initial weight and threshold value of the threshold value as BP neural network.So far, genetic algorithm instructs single BP neural network
Practice optimization.
9, using the Genetic BP Neutral Network after step 8 training optimization, step 5 is repeated to step 7, obtains one in advance
Survey ability is good based on genetic algorithm optimization BP neural network.
10, mastitis for milk cows is detected based on genetic algorithm optimization BP neural network using what step 9 obtained.Pass through conductivity
The numerical value of value, pH value and temperature can must be predicted the numerical value of somatic number by the Genetic BP Neutral Network trained.
Embodiment
Establish the mastitis for milk cows detection method based on genetic algorithm optimization BP neural network:
1, data sample is obtained;
2, data prediction;
By data prediction, the measured value of each data dimension is obtained.
3, the network topology structure of single BP neural network is determined:
Wherein, 9 X, the value that the value of n is 3, q are 1, and hidden layer is single hidden layer, and the value of N is 11.In real network training
In the process, practical node in hidden layer N ' can be determined according to forecast result of model, wherein the range of N ' is [N-2, N+2].
4, on the basis of network topology structure in step 3, single BP neural network is constructed: where m1=80%m;m2
=20%m.
5, training BP neural network;
6, determine BP neural network predictive ability Fig. 1 in the present embodiment, the measured value of single BP neural network body cell
With the comparison diagram of predicted value.
7. repeating step 5 and step 6, the good single BP neural network of a predictive ability is obtained:
Wherein, the value of number of repetition Y is 3.
8, using genetic algorithm to the initial weight and threshold optimization of single BP neural network obtained in step 7: specific
The following steps are included:
A, real coding is carried out to the initial weight of BP neural network and threshold value, determines initial population.
Preferably, input layer has 3 nodes, and hidden layer has 11 nodes, and output layer has 1 node, so BP nerve net
Network structure is 3-11-1;Genetic algorithm encoding length is 3 × 11+11 × 1+11+1=56.
B, the ideal adaptation angle value in initial population is calculated.
C, population number, the number of iterations are set, circulation is iterated.Fig. 2 is the fitness of the genetic algorithm of the present embodiment
Curve graph shows the trend of average fitness value Yu adaptive optimal control angle value in figure.
The population number is 50.
Preferably, the number of iterations is 100 times, Pc 0.7, Pm 0.1.
D, obtained optimum individual fitness value is decomposed into the link weight and threshold value of BP neural network, with link weight
Initial weight and threshold value with threshold value as BP neural network.So far, genetic algorithm trains single BP neural network
Optimization.
9, using the Genetic BP Neutral Network after the training optimization by step 8, step 5 is repeated to step 7, obtains one
Predictive ability is good based on genetic algorithm optimization BP neural network.
By determining, compared with single BP neural network algorithm, the decision system of the BP neural network after genetic optimization
Number R2 has been increased to 0.9863 from 0.9557, and root-mean-square error RMSE is reduced to 6.1852 from 10.5334, therefore, after optimization
Genetic BP Neutral Network it is better than single BP neural network prediction effect, precision is high.
Fig. 3 is to be based on genetic algorithm optimization BP neural network (GA-BP), single BP neural network algorithm in the present embodiment
(BP) comparison diagram of somatic number predicted value and measured value.Fig. 4 be the present embodiment in, single BP neural network algorithm (BP) and
When measuring somatic number based on genetic algorithm optimization BP neural network (GA-BP), the comparison diagram of the error of predicted value and measured value.
10, mastitis for milk cows is detected based on genetic algorithm optimization BP neural network using what step 9 obtained.According to Jia Lifu
Buddhist nun Asia mammitis examination criteria (CMT) judges whether milk cow suffers from mammitis.In the present embodiment, CMT method detects mastitis for milk cows
Standard is as shown in table 1.
1 CMT method of table detects mastitis for milk cows standard
The mastitis for milk cows detection method of BP neural network according to the present invention based on genetic algorithm optimization is detected:
Milk sample is detected, the conductivity of the milk sample is 5.26ms/cm, and temperature is 24.6 DEG C, pH value 6.96.It is logical
It crosses after the BP neural network of the invention based on genetic algorithm optimization detected, the somatic number measured in the milk sample is
110.9217*104A/mL.
According to the criterion of table 1, which is C grades, that is, suffers from mammitis.
Claims (6)
1. a kind of mastitis for milk cows detection method based on genetic algorithm optimization BP neural network, it is characterised in that: including as follows
Step:
1) it, obtains data sample: measuring four parameters of m cow's milk sample, respectively conductivity, pH value, temperature and body respectively
Cell number;Wherein, with each parameter for a data dimension;
2), data prediction: using mapminmax function to four data dimensions of the m cow's milk sample measured in step 1
Pretreatment is normalized in degree, is mapped to the numerical value of each data dimension between codomain [0,1];Wherein, mapminmax function
Calculation formula such as formula 1:
Y=(ymax-ymin) * (x-xmin)/(xmax-xmin)+ymin formula 1
By data prediction, the measured value of each data dimension is obtained;
3), determine the network topology structure of single BP neural network: BP neural network includes input quantity, output quantity, input layer, defeated
Layer and hidden layer out;Wherein, input quantity is conductivity, pH value, the temperature of cow's milk sample;Output quantity is that the body of cow's milk sample is thin
Born of the same parents' number;Input layer, output layer and hidden layer include multiple nodes;Wherein, the number of nodes of input layer is n, the section of output layer
Points are q, node in hidden layer N;Wherein, the value of N is calculated according to formula 2:
Wherein, X is constant, and range is 1~10;
4), on the basis of the network topology structure determined by step 3, construct single BP neural network: building mode is function structure
It builds;Wherein, the transmission function between the input layer and hidden layer of single BP neural network is tansig function, hidden layer and output
Transmission function between layer is purelin function;Construct the obtained single BP neural network successively carry out step 5, step 6 and
Step 7;
5), training BP neural network: trainlm function is chosen as training function, randomly selects the cow's milk sample m in step 2
In the temperature of m1 cow's milk sample, conductivity, pH value and somatic number measured value be trained study as training data;
6), determine the predictive ability of BP neural network:
The temperature, conductivity, pH value of remaining m2 cow's milk sample are inputted to housebroken BP neural network obtained in step 5,
The predicted value of the somatic number of m2 cow's milk sample is obtained, the predicted value is as verify data;Wherein, m2=m-m1;
The verify data of the somatic number of m2 cow's milk sample and the measured value in step 2 are compared, missed by root mean square
Poor RMSE and coefficient of determination R2Determine the predictive ability of housebroken BP neural network;Wherein, root-mean-square error RMSE and decision
Coefficients R2Value respectively such as formula 3 and formula 4:
In formula, m is cow's milk sample size;Xi is respectively the measured value and predicted value of the somatic number of each cow's milk sample;For the average value of cow's milk sample somatic number predicted value;
7) step 5 and step 6, are repeated, the good BP neural network of predictive ability is obtained:
Step 5 and step 6 are repeated, number of repetition is Y times, takes wherein RMSE minimum, R2Value is closest to 1 BP neural network
The best BP neural network of predictive ability;Wherein, the value of Y is 2~5;
8) initial weight and threshold value of the genetic algorithm single BP neural network good to predictive ability obtained in step 7, are utilized
Optimization: the following steps are included:
A, real coding is carried out to the initial weight of BP neural network and threshold value, determines initial population;
B, the ideal adaptation angle value in initial population is calculated;
C, population number, the number of iterations are set, circulation is iterated;The iterative cycles mode are as follows: circulation is selected, handed over
Fork, variation and the operation for calculating fitness value, stop when cycle-index is more than the number of iterations of setting;Selection individual is suitable
Answer the maximum individual of angle value as optimum individual;
The population number is 30~160;
The crossover probability of the intersection is Pc, and the range of Pc is 0.4~0.99;
The probability of the variation is Pm, and the range of Pm is 0.01~0.2;
D, obtained optimum individual fitness value is decomposed into the link weight and threshold value of BP neural network, with the link weight and
Initial weight and threshold value of the threshold value as BP neural network;So far, it is excellent to have carried out training to single BP neural network for genetic algorithm
Change;
9), using the Genetic BP Neutral Network after the training optimization by step 8, step 5 is repeated to step 7, obtains one in advance
Survey ability is good based on genetic algorithm optimization BP neural network;
10) mastitis for milk cows, is detected based on genetic algorithm optimization BP neural network using what step 9 obtained;By conductivity value,
PH value and the numerical value of temperature can be predicted the numerical value of somatic number by the Genetic BP Neutral Network trained.
2. the mastitis for milk cows detection method according to claim 1 based on genetic algorithm optimization BP neural network, feature exist
In: in the formula 2 of step 3, the value that the value of n is 3, q is 1;Hidden layer is single hidden layer, and the value of N is 11;In real network training
In the process, practical node in hidden layer N ' is determined according to forecast result of model, wherein the range of N ' is [N-2, N+2].
3. the mastitis for milk cows detection method according to claim 1 based on genetic algorithm optimization BP neural network, feature exist
In: in step 6, m1=80%m;M2=20%m.
4. the mastitis for milk cows detection method according to claim 1 based on genetic algorithm optimization BP neural network, feature exist
In: in step 7, when carrying out step 5 every time, the m1 of selection is all different;The value of the Y is 3.
5. the mastitis for milk cows detection method according to claim 1 based on genetic algorithm optimization BP neural network, feature exist
In: in step 8, the input layer has 3 nodes, and hidden layer has 11 nodes, and output layer has 1 node, BP neural network knot
Structure is 3-11-1;Genetic algorithm encoding length is 56.
6. the mastitis for milk cows detection method according to claim 1 based on genetic algorithm optimization BP neural network, feature exist
In: in step 8, the number of iterations is 100 times, Pc 0.7, Pm 0.1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811609775.3A CN109711549A (en) | 2018-12-27 | 2018-12-27 | A kind of mastitis for milk cows detection method based on genetic algorithm optimization BP neural network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811609775.3A CN109711549A (en) | 2018-12-27 | 2018-12-27 | A kind of mastitis for milk cows detection method based on genetic algorithm optimization BP neural network |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109711549A true CN109711549A (en) | 2019-05-03 |
Family
ID=66258552
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811609775.3A Pending CN109711549A (en) | 2018-12-27 | 2018-12-27 | A kind of mastitis for milk cows detection method based on genetic algorithm optimization BP neural network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109711549A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110097973A (en) * | 2019-05-10 | 2019-08-06 | 重庆邮电大学 | The prediction algorithm of human health index based on genetic algorithm and BP neural network |
CN110412227A (en) * | 2019-07-17 | 2019-11-05 | 太原理工大学 | A kind of contactless milk freshness detection system and its detection method |
CN111505058A (en) * | 2020-03-05 | 2020-08-07 | 艾普康(香港)有限公司 | Mastitis detection analyzer |
CN111506881A (en) * | 2020-06-11 | 2020-08-07 | 中国农业大学 | System for predicting Chinese Holstein cow mastitis onset risk |
CN111709652A (en) * | 2020-06-17 | 2020-09-25 | 孙洁 | Cattle raising method based on big data |
CN111860129A (en) * | 2020-06-05 | 2020-10-30 | 天津大学 | Cancer cell classification method based on BP neural network and cell mechanical characteristic parameters |
CN112485304A (en) * | 2020-12-14 | 2021-03-12 | 河北工业大学 | Milk detection method and system based on conductance method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201828539U (en) * | 2010-09-30 | 2011-05-11 | 李延辉 | Bovine mastitis detector |
CN104484833A (en) * | 2014-12-02 | 2015-04-01 | 常州大学 | Photovoltaic power generation output power tracking algorithm based on genetics algorithm improved RBF-BP neural network |
-
2018
- 2018-12-27 CN CN201811609775.3A patent/CN109711549A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201828539U (en) * | 2010-09-30 | 2011-05-11 | 李延辉 | Bovine mastitis detector |
CN104484833A (en) * | 2014-12-02 | 2015-04-01 | 常州大学 | Photovoltaic power generation output power tracking algorithm based on genetics algorithm improved RBF-BP neural network |
Non-Patent Citations (2)
Title |
---|
崔传金等: "基于电参数与神经网络的奶牛乳腺炎检测方法", 《农业机械学报》 * |
郭庆等: "牛乳电导率和pH值变化与体细胞数相关性的研究", 《中国奶牛》 * |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110097973A (en) * | 2019-05-10 | 2019-08-06 | 重庆邮电大学 | The prediction algorithm of human health index based on genetic algorithm and BP neural network |
CN110412227A (en) * | 2019-07-17 | 2019-11-05 | 太原理工大学 | A kind of contactless milk freshness detection system and its detection method |
CN111505058A (en) * | 2020-03-05 | 2020-08-07 | 艾普康(香港)有限公司 | Mastitis detection analyzer |
CN111860129A (en) * | 2020-06-05 | 2020-10-30 | 天津大学 | Cancer cell classification method based on BP neural network and cell mechanical characteristic parameters |
CN111506881A (en) * | 2020-06-11 | 2020-08-07 | 中国农业大学 | System for predicting Chinese Holstein cow mastitis onset risk |
CN111506881B (en) * | 2020-06-11 | 2022-11-04 | 中国农业大学 | System for predicting Chinese Holstein cow mastitis onset risk |
CN111709652A (en) * | 2020-06-17 | 2020-09-25 | 孙洁 | Cattle raising method based on big data |
CN112485304A (en) * | 2020-12-14 | 2021-03-12 | 河北工业大学 | Milk detection method and system based on conductance method |
CN112485304B (en) * | 2020-12-14 | 2022-08-09 | 河北工业大学 | Milk detection method and system based on conductance method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109711549A (en) | A kind of mastitis for milk cows detection method based on genetic algorithm optimization BP neural network | |
CN108920812A (en) | A kind of machining surface roughness prediction technique | |
CN110765700A (en) | Ultrahigh voltage transmission line loss prediction method based on quantum ant colony optimization RBF network | |
CN105069220B (en) | Microbial fermentation optimization method based on BP neural network immune genetic algorithm | |
CN108550400B (en) | Method for evaluating influence of air pollutants on number of respiratory disease patients | |
CN112926265A (en) | Atmospheric porous probe measurement calibration method based on genetic algorithm optimization neural network | |
CN106447092A (en) | Marine reverse osmosis desalination system performance prediction method based on MEA-BP neural network | |
CN110824915A (en) | GA-DBN network-based intelligent monitoring method and system for wastewater treatment | |
CN103637800B (en) | Based on the method for the bioelectrical impedance analysis of eight sections of impedance models | |
CN108804851A (en) | A kind of high-precision propylene polymerization production process optimal soft survey instrument of chaos gunz optimizing | |
CN108872508A (en) | A kind of eutrophy quality evaluation method of GA-BP optimization TSFNN | |
CN109034466A (en) | A kind of laying rate of laying hen prediction technique based on Support vector regression | |
CN107958309A (en) | A kind of high dam multi-point deformetion condition combines forecasting procedure | |
CN113568055A (en) | Aviation transient electromagnetic data retrieval method based on LSTM network | |
CN115396981A (en) | Intelligent monitoring system based on big data technology | |
CN112116145A (en) | Cow feed intake assessment method based on genetic algorithm optimization BP neural network | |
Qiao et al. | The research of BP Neural Network based on One-Hot Encoding and Principle Component Analysis in determining the therapeutic effect of diabetes mellitus | |
CN106292296B (en) | Water island dosing On-Line Control Method and device based on GA SVM | |
Dutta et al. | Modelling of liquid flow control system using optimized genetic algorithm | |
CN115329930A (en) | Flood process probability forecasting method based on mixed deep learning model | |
Shang et al. | Research on intelligent pest prediction of based on improved artificial neural network | |
Guan et al. | Application of a novel PNN evaluation algorithm to a greenhouse monitoring system | |
CN113935556B (en) | Temperature sensor optimal arrangement method based on DNA genetic algorithm | |
CN103793582A (en) | Optimization method for cylindrical shell large opening connecting pipe structure | |
CN117164103A (en) | Intelligent control method, terminal and system of domestic sewage treatment system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190503 |
|
RJ01 | Rejection of invention patent application after publication |