BLUP model solution method, system, device and medium for avoiding kinship matrix inversion
By circumventing the inverse of the kinship matrix in the BLUP model and converting it into multiple multiplication operations, the problem of low computational efficiency of traditional BLUP models on large-scale data sets is solved, which significantly improves the calculation speed and maintains the estimation accuracy. It is suitable for Efficient processing of large-scale animal breeding data.
Patent Information
- Application Number
- CN202410641857.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-05-23
AI Technical Summary
The traditional BLUP model has the problem of inefficient computing when solving large-scale data sets, mainly because it involves two matrix inversion operations, especially the inverse matrix solution of affinity matrix, which leads to high computational pressure. Existing algorithms such as Apy algorithm and ssGBLUP is inefficient and has reduced estimation accuracy when inversely retrieving large matrices.
By constructing the original BLUP model and multiplying the two sides of its matrix equation by setting the intermediate matrix, the unit matrix construction of G matrix and G-1 matrix is used to avoid the inversion of the affinity matrix and convert it into multiple multiplication operations to avoid direct Find the inversion and get the breeding value.
It significantly reduces the calculation amount in the BLUP model solution process, improves the calculation speed, maintains the accuracy of breeding value estimation, reduces energy consumption, and improves the processing efficiency of large-scale data sets.
Smart Images

Figure CN118503603B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of animal breeding, and in particular to a BLUP model solving method, system, equipment and medium for avoiding kinship matrix inversion. Background Art
[0002] Animal breeding emphasizes the improvement and enhancement of genetic structure. The scientific theory of modern breeding can be traced back to the rediscovery of Mendel's laws of inheritance in 1900, which enabled breeding work to be carried out in accordance with scientific genetic laws. Systematic breeding of domestic animals made a huge leap forward after World War II. The BLUP (Best Linear Unbiased Prediction) developed by American statistician CR Henderson in the 1960s made a decisive contribution to this in terms of computing technology. The BLUP model optimizes breeding selection by estimating the empirical best prediction value (EBV). Using BLUP to evaluate the genetic potential of animals is a standard method commonly adopted by countries around the world.
[0003] As the cost of sequencing technology decreases, the amount of data obtained from gene chip sequencing is increasing, and the application of the GBLUP model in animal breeding has become more extensive. However, this increase in data volume also brings new challenges: when the number of animals becomes extremely large, traditional computing methods face huge computing pressure and resource limitations. The processing of large-scale data sets requires a lot of computing resources, especially when it involves complex genetic evaluations and large matrix operations. Therefore, studying how to improve the computational efficiency of the BLUP model on large-scale data sets while maintaining its accuracy has become an urgent problem that needs to be solved.
[0004] The traditional BLUP model has a problem of low computational efficiency when solving EBV on large-scale data sets, mainly because it involves two matrix inversion operations, one of which is the inverse matrix of the kinship matrix and the other is the inverse matrix of a larger matrix containing fixed effects. Matrix inversion is a computationally expensive step, so optimizing this process is crucial to improving the efficiency of BLUP model solutions.
[0005] In ABLUP, the first matrix inversion is the inversion of the A matrix. In 1975, Henderson proposed that A can be constructed directly from the pedigree. -1 A simple method, iterative method directly constructs A -1 The first matrix inversion is avoided, which improves the computational efficiency of ABLUP to a certain extent. In GBLUP, the Apy algorithm proposes to divide the population into core groups (c) and non-core groups (n), and can directly construct G- 1, there is a core population matrix inversion in the construction process. Reducing the number of core populations will reduce the accuracy of breeding value estimation. In large populations, it is still difficult to invert the core matrix. The existing Apy algorithm and ssGBLUP algorithm cannot avoid the inversion of large matrices, and the accuracy of breeding value estimation is lost. Summary of the invention
[0006] The purpose of the present invention is to provide a BLUP model solution method, system, device and medium that avoids the inversion of the kinship matrix, which can directly avoid the inversion of the kinship matrix, reduce the amount of calculation in the BLUP model solution process by half, significantly improve the calculation speed of the BLUP model solution, and maintain the accuracy of breeding value estimation.
[0007] To achieve the above object, the present invention provides the following solutions:
[0008] A BLUP model solving method that avoids inversion of kinship matrix includes:
[0009] Constructing an original BLUP model; the original BLUP model includes a kinship matrix and a matrix containing fixed effects;
[0010] Multiply both sides of the matrix equation in the original BLUP model by the set intermediate matrix, and construct the G matrix and G- 1 The unit matrix of the matrix is used to solve the model on the basis of avoiding the inversion of the kinship matrix to obtain the breeding value.
[0011] Optionally, the original BLUP model is expressed as:
[0012]
[0013] Among them, X is the fixed effect matrix; X' is the transpose of X; Z is the random effect matrix, Z' is the transpose of Z; y is the observation matrix; G is the kinship matrix, size is n*n; n is the number of animal individuals; G- 1 is the inverse matrix of G; k represents the heritability of the phenotype, which is a constant; is the fixed effect value to be solved, is the random effect value to be solved.
[0014] Optionally, the specific process of solving the model is:
[0015] Multiply both sides of the expression of the original BLUP model by The formula after multiplication is Where I represents the identity matrix;
[0016] Construct the B matrix: Let The entire formula transforms to:
[0017]
[0018] Construct G matrix and G -1 The identity matrix of a matrix:
[0019] Let the transformed B matrix formula multiply both sides by G matrix and G -1 The identity matrix of the matrix gives:
[0020]
[0021]
[0022] Construct the A matrix: The entire formula transforms to:
[0023]
[0024] Multiplying the matrices in the formula, we get:
[0025]
[0026]
[0027] The formula after multiplication conforms to the form of the linear equation system Ax=b. Let both sides of the A matrix be multiplied by the unit matrix of the G matrix, and we get And simplify to get
[0028] The present invention also provides a BLUP model solving system for avoiding kinship matrix inversion, comprising:
[0029] A model building module, used to build an original BLUP model; the original BLUP model includes a kinship matrix and a matrix containing fixed effects;
[0030] The model solving module is used to multiply both sides of the matrix equation in the original BLUP model by the set intermediate matrix, and construct the G matrix and G matrix in the original BLUP model. -1 The unit matrix of the matrix is used to solve the model on the basis of avoiding the inversion of the kinship matrix to obtain the breeding value.
[0031] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the BLUP model solving method that avoids the inversion of the kinship matrix.
[0032] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the BLUP model solving method for avoiding the inversion of the kinship matrix as described above.
[0033] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0034] The present invention discloses a BLUP model solution method, system, device and medium for avoiding inversion of kinship matrix. The method comprises constructing an original BLUP model; the original BLUP model comprises a kinship matrix and a matrix containing fixed effects; multiplying both sides of the matrix equation in the original BLUP model by a set intermediate matrix, and constructing a G matrix and a G matrix in the original BLUP model. -1 The unit matrix of the matrix is solved on the basis of avoiding the inversion of the kinship matrix to obtain the breeding value. The present invention can directly avoid the inversion of the kinship matrix, halve the amount of calculation in the BLUP model solution process, significantly improve the calculation speed of the BLUP model solution, and maintain the accuracy of the breeding value estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0036] Figure 1 The present invention is a flow chart of the BLUP model solving method that avoids the inversion of the kinship matrix. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 creative work are within the scope of protection of the present invention.
[0038] The purpose of the present invention is to provide a BLUP model solution method, system, device and medium that avoids the inversion of the kinship matrix, which can directly avoid the inversion of the kinship matrix, reduce the amount of calculation in the BLUP model solution process by half, significantly improve the calculation speed of the BLUP model solution, and maintain the accuracy of breeding value estimation.
[0039] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0040] like Figure 1 As shown, the present invention provides a BLUP model solving method that avoids the inversion of the kinship matrix, including:
[0041] Step 100: constructing an original BLUP model; the original BLUP model includes a kinship matrix and a matrix containing fixed effects;
[0042] Step 200: Multiply both sides of the matrix equation in the original BLUP model by the set intermediate matrix, and construct the G matrix and G matrix in the original BLUP model. -1 The unit matrix of the matrix is used to solve the model on the basis of avoiding the inversion of the kinship matrix to obtain the breeding value.
[0043] Based on the above technical solution, the following embodiments are provided.
[0044] Taking GBLUP as an example, when constructing a BLUP model, it is necessary to obtain G by inverting the G matrix. -1 .
[0045]
[0046] This embodiment provides a mathematical optimization idea for the BLUP model, and its mathematical principle is as follows:
[0047] Multiply both sides of the original formula
[0048] The multiplication formula is:
[0049] Construction B: Let
[0050] The entire formula transforms to:
[0051] Construct G and G -1 The identity matrix of :
[0052] Multiply both sides by G and G -1 The identity matrix of :
[0053]
[0054]
[0055] Construction A: Let
[0056] The entire formula transforms to:
[0057] Matrix multiplication gives:
[0058] The matrices are then multiplied to get:
[0059] The constructed formula conforms to the form of the linear equation system Ax=b, and the linear equation system can be solved by the method of Krylov subspace set A.
[0060] Solve for A and bring the resulting A back into the original formula:
[0061] Multiply both sides by the identity matrix of G:
[0062] Simplified:
[0063] That is, fixed effects and random effects (breeding values) can be obtained without inverting.
[0064] This implementation has the following beneficial effects:
[0065] In the traditional method, the complexity of the inversion calculation is n cubed, while the present invention adopts a strategy of avoiding the inversion of the kinship matrix, converting the inversion operation into multiple multiplication operations, whose complexity is n squared. As the number of animal individuals n increases, the efficiency of avoiding the inversion calculation is better than the direct inversion method.
[0066] Under large-scale data sets, this technology significantly improves computing efficiency. In addition, this technology not only performs well in reducing computing time, but also greatly improves computing efficiency when processing large-scale data sets, providing a more efficient and energy-saving solution for complex genetic evaluation and breeding value estimation. At the same time, by reducing computing time, this method also helps to reduce energy consumption, thereby alleviating the need for high-performance computing resources, and helping to achieve more environmentally friendly and cost-effective scientific computing.
[0067] In addition, the present invention also provides a BLUP model solving system that avoids the inversion of kinship matrix, including:
[0068] A model building module, used to build an original BLUP model; the original BLUP model includes a kinship matrix and a matrix containing fixed effects;
[0069] The model solving module is used to multiply both sides of the matrix equation in the original BLUP model by the set intermediate matrix, and construct the G matrix and G matrix in the original BLUP model. -1 The unit matrix of the matrix is used to solve the model on the basis of avoiding the inversion of the kinship matrix to obtain the breeding value.
[0070] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the BLUP model solving method that avoids the inversion of the kinship matrix.
[0071] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the BLUP model solving method for avoiding the inversion of the kinship matrix as described above.
[0072] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0073] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A BLUP model solving method that avoids the inversion of kinship matrix, characterized in that: include: Constructing an original BLUP model; the original BLUP model includes a kinship matrix and a matrix containing fixed effects; Multiply both sides of the matrix equation in the original BLUP model by the set intermediate matrix, and construct the G matrix and G matrix in the original BLUP model. -1 The identity matrix of the matrix is used to solve the model on the basis of avoiding the inversion of the kinship matrix and obtain the breeding value; The specific process of solving the model is as follows: Multiply both sides of the expression of the original BLUP model by The formula after multiplication is Where I represents the identity matrix; Construct the B matrix: Let The entire formula transforms to: Construct G matrix and G -1 The identity matrix of a matrix: Let the transformed B matrix formula multiply both sides by G matrix and G -1 The identity matrix of the matrix gives: Construct the A matrix: The entire formula transforms to: Multiplying the matrices in the formula, we get: The formula after multiplication conforms to the form of the linear equation system Ax=b. Let both sides of the A matrix be multiplied by the unit matrix of the G matrix, and we get And simplify to get 2. The BLUP model solving method for avoiding kinship matrix inversion according to claim 1, characterized in that: The original BLUP model is expressed as: Where X is the fixed effect matrix; X' is the transpose of X; Z is the random effect matrix, and Z' is the transpose of Z; y is the observation matrix; G is the kinship matrix, with a size of n*n; n is the number of animal individuals; G -1 is the inverse matrix of G; k represents the heritability of the phenotype, which is a constant; is the fixed effect value to be solved, is the random effect value to be solved.
3. A BLUP model solving system that avoids kinship matrix inversion, applied to the method as described in any one of claims 1-2, characterized in that: include: A model building module, used to build an original BLUP model; the original BLUP model includes a kinship matrix and a matrix containing fixed effects; The model solving module is used to multiply both sides of the matrix equation in the original BLUP model by the set intermediate matrix, and construct the G matrix and G matrix in the original BLUP model. -1 The unit matrix of the matrix is used to solve the model on the basis of avoiding the inversion of the kinship matrix to obtain the breeding value.
4. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the BLUP model solving method for avoiding kinship matrix inversion according to any one of claims 1 to 2.
5. A computer-readable storage medium, characterized in that: The device stores a computer program, which, when executed by a processor, implements the BLUP model solving method for avoiding kinship matrix inversion as described in any one of claims 1 to 2.
