Construction and training method of genetic law simulation prediction model
By constructing and training a genetic law simulation prediction model based on a hidden Markov model, the problems of long time consumption and low accuracy in genetic law research are solved, and efficient and fast simulation prediction and personalized research are achieved.
Patent Information
- Application Number
- CN202510785921.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-12
- Publication Date
- 2025-09-23
AI Technical Summary
Existing technologies take a long time to study genetic laws and are unable to conduct simulation predictions efficiently and quickly. Once errors occur in the breeding direction, a lot of resources will be wasted.
A genetic law simulation prediction model is constructed, which is based on the hidden Markov model. By determining the initial state probability distribution, state transition probability matrix and observation probability distribution matrix, the forward algorithm, backward algorithm and EM algorithm are combined for training to form a genetic law simulation prediction model.
It achieves efficient and fast simulation prediction of genetic laws, supports simulation of simulated data and real data, improves the accuracy and efficiency of research, and provides personalized research guidance.
Smart Images

Figure CN120690284A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to genetic law simulation prediction, and in particular to a genetic law simulation prediction model construction and training method. Background Art
[0002] The laws of inheritance are the foundation of genetics, primarily used to explain heredity. Through experimental observation and summary, these laws describe heredity phenomena such as seed color, fruit shape, flower color, and blood type. These laws provide the foundation for observing and studying the laws of gene transmission.
[0003] However, existing research on the laws of inheritance mainly uses traditional research methods, namely, using biological breeding and cultivation techniques, and utilizing methods such as mutagenesis, hybridization, cell engineering, and genetic engineering. These traditional research methods have the following disadvantages:
[0004] 1) The research process takes a very long time;
[0005] 2) Once the breeding direction is wrong, a lot of time, manpower, material and financial resources will be wasted;
[0006] 3) It is not possible to perform rapid simulation predictions of genetic laws efficiently and quickly. Summary of the Invention
[0007] (1) Technical problems solved
[0008] In response to the above-mentioned shortcomings of the prior art, the present invention provides a construction and training method for a genetic law simulation prediction model, which can effectively overcome the defect of the prior art that it cannot perform efficient and fast simulation prediction of genetic laws.
[0009] (2) Technical solution
[0010] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0011] The method for constructing a genetic law simulation prediction model includes the following steps:
[0012] S11. The gene type is used as the hidden state of the hidden Markov model, and the gene phenotype is used as the observed value of the hidden Markov model;
[0013] S12, determining the initial state probability distribution of the hidden Markov model;
[0014] S13. Construct the state transition probability matrix of the hidden Markov model based on the diagonally dominant matrix method;
[0015] S14, determining the observation probability distribution matrix of the hidden Markov model;
[0016] S15. Using the obtained hidden Markov model as a genetic law simulation prediction model.
[0017] Preferably, determining the initial state probability distribution of the hidden Markov model in S12 includes:
[0018] The initial state probability distribution is π={π i};
[0019] Among them, π i is the probability of the existence of a specific genotype at the initial moment.
[0020] Preferably, the state transition probability matrix of the hidden Markov model is constructed based on the diagonally dominant matrix method in S13, including:
[0021] The state transition probability matrix is A={a ij};
[0022] Among them, a ij The genotype at time t is x i , at time t+1 the genotype is x j The probability of a ij =P(x j (t+1),x i (t)), x j (t+1) means that the genotype at time t+1 is x j , x i (t) indicates that the genotype at time t is x i .
[0023] Preferably, a ij Use the diagonally dominant matrix method to determine:
[0024] The probability of the dominant trait appearing in the observation sequence is selected as the adjustment factor:
[0025] evident = number of individuals showing the dominant trait / total number of individuals;
[0026] Then a ij Use the following formula to calculate:
[0027]
[0028] Where N is the total number of genotypes, 1≤i≤N, 1≤j≤N.
[0029] Preferably, determining the observation probability distribution matrix of the hidden Markov model in S14 includes:
[0030] The observation probability distribution matrix is B = {b ij};
[0031] Among them, b ij The genotype of the individual is x i , and the phenotype is y j The probability of b ij Use the following formula to calculate:
[0032]
[0033] h is the total number of phenotypes.
[0034] Preferably, the hidden Markov model obtained in S15 is used as a genetic law simulation prediction model, including:
[0035] The obtained hidden Markov model λ = (N, M, π, A, B) is used as a genetic law simulation prediction model;
[0036] Where M is the total number of observations in the observation sequence.
[0037] The training method of the genetic law simulation prediction model is used to train the genetic law simulation prediction model obtained by the genetic law simulation prediction model construction method, and includes the following steps:
[0038] S21. Initialize the hidden Markov model λ = (N, M, π, A, B) and extract the first observation sequence;
[0039] S22, determine whether the current observation sequence is valid, if valid, enter S23, otherwise enter S28;
[0040] S23, calculating the forward probability factor using a forward algorithm;
[0041] S24, calculating the backward probability factor using a backward algorithm;
[0042] S25. Calculate the probability of the current observation sequence;
[0043] S26, re-estimate the parameters of the hidden Markov model λ=(π, A, B) using the EM algorithm;
[0044] S27, determining whether the log-likelihood value is less than a preset threshold, if so, terminating the iteration and returning the current model parameters, otherwise proceeding to S28;
[0045] S28. Take out the next observation sequence and return to S22 until the last observation sequence is taken out.
[0046] Preferably, in S23, a forward algorithm is used to calculate the forward probability factor, including:
[0047] The forward probability factor is calculated using the following formula:
[0048]
[0049] Among them, α t (i) is the forward probability factor at time t, indicating that the state is i at time t and generates the observation sequence y1, y2,…, y t The probability of b j (y t+1 ) indicates being in state j and generating observation value y t+1 The probability of t+1 (j) is the forward probability factor, which means that at time t+1, it is in state j and generates the observation sequence y1, y2,…, y t+1 probability.
[0050] Preferably, in S24, a backward algorithm is used to calculate the backward probability factor, including:
[0051] The backward probability factor is calculated using the following formula:
[0052]
[0053] Among them, β t+1 (j) is the backward probability factor at time t+1, indicating that at time t+1, the state is in state j and the subsequent observation sequence y is generated. t+2 ,y t+3 ,…,y n The probability of t (i) is the backward probability factor, indicating that the state is in state i at time t and generates the subsequent observation sequence y t+1 ,y t+2 ,…,y n The probability of n being the number of observations in the observation sequence.
[0054] Preferably, calculating the probability of the current observation sequence in S25 includes:
[0055] The probability of the current observation sequence is calculated using the following formula:
[0056]
[0057] Where P(Y|λ) represents the output observation sequence Y=y1,y2,…,y under the hidden Markov model λ=(π,A,B). n probability.
[0058] (3) Beneficial effects
[0059] Compared with the existing technology, the present invention provides a construction and training method for a genetic law simulation prediction model. This patent can efficiently and quickly perform simulation predictions of genetic laws by constructing and training a genetic law simulation prediction model, effectively solving the problems of long time consumption and low accuracy in traditional genetic law research methods. The present invention supports genetic law simulation predictions of simulated data and real data, can meet different personalized needs, and can provide a guiding research method for the research work of genetic laws. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. Those skilled in the art can also derive other drawings based on these drawings without inventive effort.
[0061] Figure 1 A schematic diagram of the process of constructing the genetic law simulation prediction model in the present invention;
[0062] Figure 2 Schematic diagram of the process of training the genetic law simulation prediction model in the present invention;
[0063] Figure 3 The log-likelihood value trend graph of Experiments 1-6 in the present invention;
[0064] Figure 4 A comparison chart of the experimental results in Experiment 1 of the present invention and the actual results;
[0065] Figure 5 This is a comparison chart of the DOMINATEHMM algorithm, PSO algorithm and actual results in Experiment 2 of the present invention;
[0066] Figure 6 This is a comparison chart of the DOMINATEHMM algorithm, PSO algorithm and actual results in Experiment 3 of the present invention;
[0067] Figure 7 This is a comparison chart of the DOMINATEHMM algorithm, PSO algorithm and actual results in Experiment 4 of the present invention;
[0068] Figure 8 This is a comparison chart of the DOMINATEHMM algorithm, PSO algorithm and actual results in Experiment 5 of the present invention. DETAILED DESCRIPTION
[0069] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0070] The construction method of the genetic law simulation prediction model, such as Figure 1 As shown in S11, the gene type is used as the hidden state of the hidden Markov model, and the gene phenotype is used as the observation value of the hidden Markov model.
[0071] S12. Determine the initial state probability distribution of the hidden Markov model, specifically including:
[0072] The initial state probability distribution is π={π i};
[0073] Among them, π i is the probability of the existence of a specific genotype at the initial moment.
[0074] S13. Constructing a state transition probability matrix of a hidden Markov model based on a diagonally dominant matrix method, specifically including:
[0075] The state transition probability matrix is A={a ij};
[0076] Among them, a ij The genotype at time t is x i , at time t+1 the genotype is x j The probability of a ij =P(x j (t+1),x i (t)), x j (t+1) means that the genotype at time t+1 is x j , x i (t) indicates that the genotype at time t is x i .
[0077] Specifically, a ij Use the diagonally dominant matrix method to determine:
[0078] The probability of the dominant trait appearing in the observation sequence is selected as the adjustment factor:
[0079] evident = number of individuals showing the dominant trait / total number of individuals;
[0080] Then a ijUse the following formula to calculate:
[0081]
[0082] Where N is the total number of genotypes, 1≤i≤N, 1≤j≤N.
[0083] S14. Determine the observation probability distribution matrix of the hidden Markov model, specifically including:
[0084] The observation probability distribution matrix is B = {b ij};
[0085] Among them, b ij The genotype of the individual is x i , and the phenotype is y j The probability of b ij Use the following formula to calculate:
[0086]
[0087] h is the total number of phenotypes.
[0088] S15, using the obtained hidden Markov model as a genetic law simulation prediction model, specifically including:
[0089] The obtained hidden Markov model λ = (N, M, π, A, B) is used as a genetic law simulation prediction model;
[0090] Where M is the total number of observations in the observation sequence.
[0091] On the basis of the above disclosed construction method of the genetic law simulation prediction model, the technical solution of the present application further discloses a training method of the genetic law simulation prediction model, which is used to train the genetic law simulation prediction model obtained by the above genetic law simulation prediction model construction method, such as Figure 2 As shown, the following steps are included:
[0092] S21. Initialize the hidden Markov model λ = (N, M, π, A, B) and extract the first observation sequence;
[0093] S22, determine whether the current observation sequence is valid, if valid, enter S23, otherwise enter S28;
[0094] S23, calculating the forward probability factor using a forward algorithm;
[0095] S24, calculating the backward probability factor using a backward algorithm;
[0096] S25. Calculate the probability of the current observation sequence;
[0097] S26, re-estimate the parameters of the hidden Markov model λ=(π, A, B) using the EM algorithm;
[0098] S27, determining whether the log-likelihood value is less than a preset threshold, if so, terminating the iteration and returning the current model parameters, otherwise proceeding to S28;
[0099] S28. Take out the next observation sequence and return to S22 until the last observation sequence is taken out.
[0100] Specifically, in S23, a forward algorithm is used to calculate the forward probability factor, including:
[0101] The forward probability factor is calculated using the following formula:
[0102]
[0103] Among them, α t (i) is the forward probability factor at time t, indicating that the state is i at time t and generates the observation sequence y1, y2,…, y t The probability of b j (y t+1 ) indicates being in state j and generating observation value y t+1 The probability of t+1 (j) is the forward probability factor, which means that at time t+1, it is in state j and generates the observation sequence y1, y2,…, y t+1 probability.
[0104] Specifically, in S24, a backward algorithm is used to calculate the backward probability factor, including:
[0105] The backward probability factor is calculated using the following formula:
[0106]
[0107] Among them, β t+1 (j) is the backward probability factor at time t+1, indicating that at time t+1, the state is in state j and the subsequent observation sequence y is generated. t+2 ,y t+3 ,…,y n The probability of t (i) is the backward probability factor, indicating that the state is in state i at time t and generates the subsequent observation sequence y t+1 ,y t+2 ,…,y n The probability of n being the number of observations in the observation sequence.
[0108] Specifically, the probability of the current observation sequence is calculated in S25, including:
[0109] The probability of the current observation sequence is calculated using the following formula:
[0110]
[0111] Where P(Y|λ) represents the output observation sequence Y=y1,y2,…,y under the hidden Markov model λ=(π,A,B). n probability.
[0112] In order to better verify the technical effect of the technical solution of this application, six groups of experiments are conducted below to illustrate in detail the DOMINATEHMM algorithm proposed in this application and the existing PSO algorithm.
[0113] The experimental data set uses pea seeds used in Mendel's law of inheritance, as shown in Table 1:
[0114] Table 1 Characters of pea seeds used in Mendel's laws of inheritance
[0115]
[0116] This experiment conducted six sets of experiments on one, two, and three pairs of alleles in diploids and tetraploids to verify the robustness of the DOMINATEHMM algorithm proposed in this application. The changes in the log-likelihood values of the six sets of experiments are shown in Table 2 (the corresponding log-likelihood value trend graphs of the six sets of experiments are shown in Table 2). Figure 3 shown):
[0117] Table 2 Changes in log-likelihood values for the six groups of experiments
[0118]
[0119]
[0120] The actual results comparison charts of Experiments 1 to 5 correspond to the following: Figures 4 to 8 As shown. This application uses the diagonally dominant matrix method to determine the state transition probability matrix, combines the HMM model with the EM algorithm, and creatively proposes the DOMINATEHMM algorithm. It is then applied to experimental simulations of Mendel's law of gene segregation and the law of independent assortment. Based on the results of six sets of simulation experiments on the law of gene segregation and the law of independent assortment, the proposed DOMINATEHMM algorithm achieved excellent results, with simulation accuracy rates of up to 100% for diploids and 99.8% for polyploids.
[0121] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A method for constructing a genetic law simulation prediction model, characterized by: The following steps are involved: S11. The gene type is used as the hidden state of the hidden Markov model, and the gene phenotype is used as the observed value of the hidden Markov model; S12, determining the initial state probability distribution of the hidden Markov model; S13. Construct the state transition probability matrix of the hidden Markov model based on the diagonally dominant matrix method; S14, determining the observation probability distribution matrix of the hidden Markov model; S15. Using the obtained hidden Markov model as a genetic law simulation prediction model.
2. The method for constructing a genetic law simulation prediction model according to claim 1, wherein: In S12, the initial state probability distribution of the hidden Markov model is determined, including: The initial state probability distribution is π={π i }; Among them, π i is the probability of the existence of a specific genotype at the initial moment.
3. The method for constructing a genetic law simulation prediction model according to claim 2, wherein: The state transition probability matrix of the hidden Markov model is constructed based on the diagonally dominant matrix method in S13, including: The state transition probability matrix is A={a ij }; Among them, a ij The genotype at time t is x i , at time t+1 the genotype is x j The probability of a ij =P(x j (t+1),x i (t)), x j (t+1) means that the genotype at time t+1 is x j , x i (t) indicates that the genotype at time t is x i .
4. The method for constructing a genetic law simulation prediction model according to claim 3, wherein: a ij Use the diagonally dominant matrix method to determine: The probability of the dominant trait appearing in the observation sequence is selected as the adjustment factor: evident = number of individuals showing the dominant trait / total number of individuals; Then a ij Use the following formula to calculate: Where N is the total number of genotypes, 1≤i≤N, 1≤j≤N.
5. The method for constructing a genetic law simulation prediction model according to claim 4, wherein: In S14, the observation probability distribution matrix of the hidden Markov model is determined, including: The observation probability distribution matrix is B = {b ij }; Among them, b ij The genotype of the individual is x i , and the phenotype is y j The probability of b ij Use the following formula to calculate: h is the total number of phenotypes.
6. The method for constructing a genetic law simulation prediction model according to claim 5, characterized in that: In S15, the obtained hidden Markov model is used as a genetic law simulation prediction model, including: The obtained hidden Markov model λ = (N, M, π, A, B) is used as a genetic law simulation prediction model; Where M is the total number of observations in the observation sequence.
7. A method for training a genetic law simulation prediction model, for training the genetic law simulation prediction model obtained by the genetic law simulation prediction model construction method according to claim 1, characterized in that: The following steps are involved: S21. Initialize the hidden Markov model λ = (N, M, π, A, B) and extract the first observation sequence; S22, determine whether the current observation sequence is valid, if valid, enter S23, otherwise enter S28; S23, calculating the forward probability factor using a forward algorithm; S24, calculating the backward probability factor using a backward algorithm; S25. Calculate the probability of the current observation sequence; S26, re-estimate the parameters of the hidden Markov model λ=(π, A, B) using the EM algorithm; S27, determining whether the log-likelihood value is less than a preset threshold, if so, terminating the iteration and returning the current model parameters, otherwise proceeding to S28; S28. Take out the next observation sequence and return to S22 until the last observation sequence is taken out.
8. The training method of the genetic law simulation prediction model according to claim 7, characterized in that: S23 uses a forward algorithm to calculate the forward probability factor, including: The forward probability factor is calculated using the following formula: Among them, α t (i) is the forward probability factor at time t, indicating that the state is i at time t and generates the observation sequence y1, y2,…, y t The probability of b j (y t+1 ) indicates being in state j and generating observation value y t+1 The probability of t+1 (j) is the forward probability factor, which means that at time t+1, it is in state j and generates the observation sequence y1, y2,…, y t+1 probability.
9. The training method of the genetic law simulation prediction model according to claim 8, characterized in that: S24 uses a backward algorithm to calculate the backward probability factor, including: The backward probability factor is calculated using the following formula: Among them, β t+1 (j) is the backward probability factor at time t+1, indicating that at time t+1, the state is in state j and the subsequent observation sequence y is generated. t+2 ,y t+3 ,…,y n The probability of t (i) is the backward probability factor, indicating that the state is in state i at time t and generates the subsequent observation sequence y t+1 ,y t+2 ,…,y n The probability of n being the number of observations in the observation sequence.
10. The training method of the genetic law simulation prediction model according to claim 9, characterized in that: The probability of the current observation sequence is calculated in S25, including: The probability of the current observation sequence is calculated using the following formula: Where P(Y|λ) represents the output observation sequence Y=y1,y2,…,y under the hidden Markov model λ=(π,A,B). n probability.