Method for predicting total intestinal digestible calcium and phosphorus content in growing pigs based on a linear model

By constructing a calcium and phosphorus digestibility prediction method based on a linear model, the problem of the accuracy of calcium and phosphorus supplementation levels in pig diets was solved, achieving high-precision and stable prediction of calcium and phosphorus digestibility, and reducing resource waste and environmental pollution.

CN121148537BActive Publication Date: 2026-02-13SOUTHWEAT UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511676492.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-02-13
Estimated Expiration
2045-11-17

AI Technical Summary

Technical Problem

In existing technologies, the addition levels of calcium and phosphorus in pig diets lack precision, leading to resource waste and environmental pollution. Traditional methods cannot effectively predict the whole intestinal digestibility of calcium and phosphorus, and existing models cannot handle complex linear relationships.

Method used

By constructing a prediction method based on a linear model, utilizing feature engineering and interaction terms, and combining data preprocessing and validation, a high-precision calcium and phosphorus digestibility prediction model is established, including feature selection and model training, and a linear regression model is used to predict calcium and phosphorus.

Benefits of technology

It achieves high-precision prediction of calcium and phosphorus digestibility, reduces resource waste and environmental pollution, improves the stability and universality of the model, and can adapt to feed ingredients from different sources and batches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121148537B_ABST
    Figure CN121148537B_ABST
Patent Text Reader

Abstract

The application discloses a method for predicting total intestinal digestible calcium and phosphorus content of growing pigs based on a linear model, and relates to a method for estimating total intestinal digestible calcium and phosphorus content, comprising the following steps: S1, arranging collected data sets through a preprocessing module to obtain an initial data set containing input features and target variables; the target variables include total intestinal digestible calcium content ATTD_Ca and total intestinal digestible phosphorus content ATTD_P measured through a digestion test; S2, performing feature analysis and screening on the initial data set through a feature engineering module to obtain a data sample constructed by a feature subset adapted to the target variables; S3, respectively constructing linear prediction models related to the prediction of each target variable, and training, optimizing and verifying the linear prediction models by using the data sample; and S4, importing feature data of a new feed formula to be predicted, selecting the data sample through S1-S2, and obtaining a prediction value of the target variable through the linear prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a method for estimating the total tract digestible calcium and phosphorus content of calcium and phosphorus. More specifically, the present application relates to a method for predicting the total tract digestible calcium and phosphorus content of growing pigs based on a linear model. BACKGROUND

[0002] Precision livestock farming is the core direction of modern agricultural development, and the key lies in the realization of the precise supply of nutritional elements. Calcium (Ca) and phosphorus (P) are two key mineral elements necessary for the growth and development of pigs, and are essential for bone development, cell signaling and energy metabolism. Currently, the addition level of calcium and phosphorus in pig diets is usually based on fixed requirement standards or based on production experience. This leads to two major problems: one is resource waste (such as phosphorus ore is a non-renewable resource); the second is environmental pollution caused by excessive excretion (such as soil phosphorus enrichment).

[0003] Therefore, it is crucial to evaluate the apparent total tract digestibility (ATTD), which is the core indicator of the biological utilization efficiency of calcium and phosphorus. Traditional ATTD determination relies on strict and costly animal digestion tests, which require precise feeding and collection of feces and urine, and the process is tedious, time-consuming, and stressful to animals, and is difficult to apply on a large scale in actual production sites. The industry urgently needs a fast, accurate, and low-cost method to predict the digestibility of mineral elements to achieve truly precise feeding.

[0004] In predicting the digestibility of nutritional components, in-vitro chemical simulation methods are used to estimate in-vivo digestibility by simulating the chemical environment of the animal's stomach and intestines (such as using hydrochloric acid, pepsin, trypsin, etc.). The disadvantage of this method is that there is a large difference between the simulation conditions and the complex in-vivo physiological environment (such as microbial action, endocrine regulation, chyme flow rate, etc.), resulting in limited prediction accuracy. It is also possible to quickly predict the nutritional value of feed by establishing a correlation between the spectrum of the feed and the chemical components. The model is heavily dependent on the accuracy of chemical analysis, and for biological function indicators such as digestibility, rather than simple chemical components, the stability and universality of the prediction model are often poor, especially when the feed raw materials are varied. In terms of data processing, traditional statistical methods (such as multiple linear regression, MLR) have been used to establish a regression equation between feed components and digestibility. However, these methods cannot effectively handle high-dimensional, multi-collinear data, and it is difficult to capture complex linear interactions between variables, and there is a ceiling in the model prediction ability.

[0005] From the above, the main problems in the prior art are as follows:

[0006] 1. In-vitro chemical simulation method has low prediction accuracy; traditional statistical models cannot effectively capture complex linear relationships.

[0007] 2. Traditional statistical models assume that variables are independent of each other, which fails to reflect synergistic or antagonistic effects in reality. Summary of the Invention

[0008] One object of the present invention is to solve at least the above-mentioned problems and / or defects, and to provide at least the advantages described below.

[0009] To achieve these objectives and advantages of the present invention, a method for predicting the whole gut digestible calcium and phosphorus content of growing pigs based on a linear model is provided, comprising:

[0010] S1. The collected dataset is processed by the preprocessing module to obtain an initial dataset containing input features and target variables, wherein the input features include: feed chemical composition, animal information, and experimental conditions;

[0011] The target variables include: the total intestinal digestible content of calcium (ATTD_Ca) and the total intestinal digestible content of phosphorus (ATTD_P) as determined by digestion tests;

[0012] S2. The initial dataset is analyzed and filtered through the feature engineering module to obtain data samples constructed from feature subsets that are compatible with the target variable. The feature subsets include body weight, total calcium, total phosphorus, and phytic acid phosphorus.

[0013] S3. Construct linear prediction models related to the prediction of each target variable, and use data samples for training, optimization, and validation.

[0014] S4. Import the characteristic data of the new feed formula to be predicted, complete the selection of data samples through S1-S2, and then obtain the predicted value of the target variable through the linear prediction model.

[0015] In S3, the linear prediction model of ATTD_Ca is characterized by the following equation:

[0016] ;

[0017] In the above formula, For the regression constant, , , , These are the regression coefficients for the corresponding parameters, where weight is body weight, total-Ca is total calcium, and phytase is phytase. 2 This is the quadratic term of phytase. This is random error;

[0018] The linear prediction model of ATTD_P is characterized by the following equation:

[0019] ;

[0020] In the above formula, is a regression constant, 、 、 is a regression coefficient corresponding to the parameter, total-P is total phosphorus, is a random error.

[0021] Preferably, in S1, the preprocessing module arranges the collected data set in the following manner:

[0022] S10, detect missing values in the data set by the naniar:vis_miss() function in R language, and delete the data with missing values higher than the threshold value, and for the data with missing values lower than the threshold value, use the mean or median of the samples of the same variety and the same stage to fill the missing data, and complete the missing value processing;

[0023] S11, use a box plot to identify the data after missing value processing, so as to eliminate abnormal data points caused by measurement or recording errors, wherein the abnormal data points refer to the variable distribution shown by the box plot.

[0024] Preferably, in S2, the feature engineering module is configured to use Pearson correlation coefficient to analyze the linear correlation between each input feature and the target variable.

[0025] When the linear correlation coefficient r is greater than 0.6, it indicates that the linear correlation between the corresponding input feature and the target variable is strong.

[0026] Preferably, in S3, after training, the linear prediction model of ATTD_Ca is represented by the following formula:

[0027] ;

[0028] After training, the linear prediction model of ATTD_P is represented by the following formula:

[0029] .

[0030] Preferably, in S3, the exponential weighted error loss index I is used to verify the linear prediction model of ATTD_Ca:

[0031] ;

[0032] The exponential weighted error loss index II is used to verify the linear prediction model of ATTD_P:

[0033] ;

[0034] In the above formula, R2 is the determination coefficient, RMSE is the root mean square error, and MAE is the mean absolute error.

[0035] The present application at least includes the following beneficial effects: in Model_Ca, by introducing phytase2 (quadratic term), the model no longer requires that the effect of phytase and the addition amount are in a simple linear relationship. In Model_P, by introducing weight x total_P (interaction term), the model acknowledges that the influence of the two factors, "body weight" and "total phosphorus content", on the digestibility is not independent. Through these two methods, it is revealed that the effect of one variable (such as total phosphorus) will change with the level of another variable (body weight).

[0036] The present application greatly enhances the explanatory power and prediction accuracy of the model by incorporating statistical techniques (quadratic term, interaction term) and transformation (logarithmic transformation) within the framework of the classical linear model. The two models successfully describe the complex biological processes in vivo that cannot be simulated by in vitro chemical methods, and break through the simplification assumptions of traditional linear statistical models.

[0037] Other advantages, objects, and features of the present application will be apparent from the following description, and will be understood by those skilled in the art. BRIEF DESCRIPTION OF DRAWINGS

[0038] Figure 1 The flowchart of the method for predicting the total intestinal digestible calcium and phosphorus content of growing pigs based on the linear model of the present application. DETAILED DESCRIPTION

[0039] The present application will be further described in detail below with reference to the accompanying drawings, so that those skilled in the art can implement it according to the description.

[0040] The present application provides a method for predicting the calcium and phosphorus ATTD of pigs in feed with high precision and high stability, to overcome the defects of low precision of existing in vitro simulation method and inability of traditional statistical models to handle complex linear relationships. In specific implementation, the present application constructs an initial data based on a large amount of historical in vivo digestion test data of multiple dimensions, selects sample data that can be used for model training, optimization, and verification through specific feature engineering, and finally generates an intelligent model system that can accurately predict the calcium and phosphorus ATTD values in new feed samples by adding cross terms and other core methods in the linear model during model construction.

[0041] In the present application, the method for predicting the total intestinal digestible calcium and phosphorus content of growing pigs based on a linear model mainly includes the following processing procedures:

[0042] S1, the collected data set is arranged through a pretreatment module to obtain an initial data set containing input features and target variables, the present step mainly includes: data preparation and pretreatment, the purpose is to prepare a high-quality, standardized initial data set for later model training; 1, the source of data preparation can be obtained by collecting historical data from multiple, standardized pig in vivo digestion tests, or collected from published research in conference abstracts retrieved from peer-reviewed journals and public databases (including Web of Science, PubMed and CAB Abstracts), but each test sample contains: input features (X) and target variables (y).

[0043] The input features (X) include: feed chemical composition, animal information, and test conditions;

[0044] Among them, the data related to feed chemical composition includes: measured content of crude protein (CP), crude fat (EE), crude fiber (CF), neutral detergent fiber (NDF), acid detergent fiber (ADF), starch (Starch), total calcium (Total Ca), total phosphorus (Total P), phytate phosphorus (Phytate-P), phytase (Phytase) and other components (based on dry matter or as is).

[0045] The data of animal information includes: pig breeds (such as Duroc, Landrace, Large White and their crossbred offspring), growth stages (such as piglets, growing pigs, and finishing pigs), and average body weight.

[0046] The data of test conditions includes: feeding method (free access or restricted feeding), and test period length.

[0047] The target variable (y) is the accurately measured total intestinal digestible content of calcium (ATTD_Ca) and phosphorus (ATTD_P) through the corresponding digestion test.

[0048] 2, the contents of data pretreatment mainly include: missing value processing and outlier processing, among them, the missing value processing: through the naniar: vis_miss() function in R language to detect the missing values in the data set, and delete the whole data with missing values higher than the threshold value (threshold value is when the missing value number of data row is more than 30%), and for the data lower than the threshold value, use the mean or median of samples of the same breed and the same stage to fill the missing data, complete the missing value processing;

[0049] Outlier treatment: the data after missing value treatment is identified using a box plot to eliminate abnormal data points caused by measurement or recording errors, which are the distribution of a variable shown by a line chart, consisting of five key statistics: minimum value Min, Q1, median value Median, Q3, and maximum value Max. And define: IQR = Q3 - Q1 (Q1 refers to 1 / 4 quantile, Q3 refers to 1 / 4 quantile, and IQR is the interquartile range). If the observation value is less than Q1 - 1.5 x IQR or greater than Q3 + 1.5 x IQR, the point is considered an outlier.

[0050] S2, performing feature analysis and screening on the initial data set through a feature engineering module to obtain a data sample constructed by a feature subset suitable for the target variable, the feature subset including body weight, total calcium, total phosphorus, and phytate phosphorus;

[0051] The feature engineering module mainly screens a feature subset most representative for predicting the target from the original features to reduce the risk of overfitting and improve the efficiency of the model. The feature selection of the feature engineering module mainly uses the Pearson correlation coefficient to analyze the linear correlation between the features and the target variables (ATTD_Ca, ATTD_P) to eliminate low correlation features, because many of the input features are irrelevant to the digestibility, and when the correlation coefficient r of the alternative indicators is less than 0.6, they will be deleted.

[0052] The final preferred feature subset includes: body weight (kg), total calcium (g / kg), total phosphorus (g / kg), and phytate phosphorus (FTU / g).

[0053] Sample data division: the processed sample data is randomly divided into a training set and an independent test set in a ratio of 7:3. The training set is used for model construction and optimization, and the independent test set is only used for final evaluation of the generalization performance of the model.

[0054] S3, respectively constructing linear prediction models related to the prediction of each target variable, training, optimizing, and verifying using the data sample;

[0055] In this step, independent linear prediction models are constructed for calcium and phosphorus, respectively. The logarithm of the total intestinal digestible content of calcium (ATTD_Ca) is a linear regression model (Model_Ca) about body weight (weight), total calcium content (total_Ca), phytase (phytase), and the square of phytase (phytase²), and the representation of ATTD_Ca is as follows:

[0056] ;

[0057] : intercept term, representing the baseline digestibility level;

[0058] : weight coefficient for calcium digestibility, reflecting the difference in absorption due to body weight change;

[0059] : linear effect of total calcium content on ATTD_Ca;

[0060] , : linear and quadratic effects of phytase addition, respectively, to characterize the possible linear effect;

[0061] : random error term, assumed to follow a normal distribution with zero mean.

[0062] Parameter constraints: to ensure the biological reasonableness of the model, the effect of phytase addition on calcium absorption is monotonically increasing within a certain range, which can be limited to .

[0063] The total tract digestibility of phosphorus (ATTD_P) is a linear regression model (Model_P) with respect to total phosphorus content (total_P), phytase (phytase), and the interaction of body weight and total phosphorus content (weight x total_P), which is characterized as follows:

[0064]

[0065] : baseline parameter, representing the basal digestibility under the condition of standard body weight and average phosphorus level;

[0066] : linear effect of total phosphorus content, reflecting the main effect of dietary phosphorus level on digestibility;

[0067] : effect of phytase addition on ATTD_P, characterizing the promotion of phytate phosphorus decomposition by the enzyme;

[0068] : interaction effect of body weight and total phosphorus content, used to describe the difference in phosphorus absorption efficiency of individuals with different body weights;

[0069] : error term, assumed to follow a normal distribution with zero mean and homoscedasticity.

[0070] Parameter constraints: to ensure the biological reasonableness of the model, phytase is expected to promote ATTD_P, so ; for the interaction term , if the body weight increases, the effect of total phosphorus is strengthened, , and vice versa.

[0071] In the model training, the least square method or maximum likelihood method is mainly used to estimate the regression coefficients of Model_Ca and Model_P through the data on the entire training set. The parameter significance test adopts t test or F test based on likelihood ratio. Specifically, the training results of Model_Ca and Model_P are shown in Tables 1 and 2:

[0072] Table 1: Training results of Model_Ca

[0073]

[0074] Table 2: Training results of Model_P

[0075]

[0076] Further, the following prediction model is obtained (it should be noted that the following estimation equation is determined after model training, which represents the final prediction method for different indicators, so it does not contain the random error term constructed in the early stage ):

[0077] Model_Ca:

[0078] ;

[0079] Model_P:

[0080] ;

[0081] Model verification: the independent test set not participating in training and tuning is used to evaluate the performance of the final model. In the verification, the coefficient of determination (R²), root mean square error (RMSE) and mean absolute error (MAE) are used as the core evaluation indexes to ensure that the model meets the application requirements. In the construction of the evaluation mixed loss function, R² should be as large as possible, RMSE and MAE should be as small as possible, and each linear prediction model needs to be adaptively transformed. The corresponding results of each evaluation index are shown in Table 3:

[0082] Table 3: Corresponding results of each performance evaluation index in the calcium and phosphorus digestibility prediction model

[0083] The exponential weighted error loss function LOSS Ca :

[0084] ;

[0085] Exponentially weighted error loss function LOSS for verifying the linear prediction model of ATTD_P P :

[0086] ;

[0087] The prediction linear model of the conventional calcium and phosphorus consumption is as follows:

[0088] ;

[0089] ;

[0090] At this time, the corresponding exponentially weighted error loss function is respectively:

[0091] ; ;

[0092] In the above formula, R² is the determination coefficient, RMSE is the root mean square error, and MAE is the mean absolute error. Generally speaking, the larger R² is, the smaller RMSE and MAE are, the smaller LOSS is, and the better the model is. When R² is low, the exponential amplification penalty is applied, and the overall loss sharply rises.

[0093] It can be seen that the exponentially weighted error loss function of the conventional prediction linear model is greater than the corresponding indicators of Model_Ca and Model_P, which indicates that the new prediction model of the present application has better prediction effect.

[0094] S4, importing the characteristic data of the new feed formula to be predicted, selecting the data sample through S1-S2, and obtaining the prediction value of the target variable through the linear prediction model;

[0095] This step mainly describes how to apply the trained model to actual prediction. When predicting a new sample (such as when predicting the calcium / phosphorus ATTD of a new feed formula), the following steps are mainly included:

[0096] 1. Obtain input: when importing the feed formula, multiple input characteristic data processed by the preprocessing module (i.e., the same data processed in the same way as the characteristic set used in the training model) are obtained, and the data samples corresponding to body weight (kg), total calcium (g / kg), total phosphorus (g / kg), and phytic acid phosphorus (FTU / g) are retrieved through the feature engineering module to form a sample vector.

[0097] 2. Call the model for prediction: input the processed data sample vector into the deployed Model_Ca and Model_P for prediction, and output the prediction value to obtain the predicted ATTD value of calcium and phosphorus under the formula.

[0098] Through the above examples, it can be known that the present application can be used for the existing feed formula, by introducing the body weight (kg), total calcium (g / kg), total phosphorus (g / kg), phytic acid phosphorus (FTU / g) of the formula into the model, the digestibility of calcium and phosphorus in the feed for pigs can be accurately predicted, if the digestibility is high, this feed formula is used, if not, the values of the body weight (kg), total calcium (g / kg), total phosphorus (g / kg), phytic acid phosphorus (FTU / g) of the feed formula are modified. Further, by accurately predicting the digestibility of calcium and phosphorus in the feed for pigs, the best proportion of feed (high in calcium and phosphorus digestibility) can be fed in each growth stage, so as to achieve the purposes of reducing feed cost and reducing environmental pollution.

[0099] Therefore, the prediction method of the present application mainly has the following effects:

[0100] 1. Higher prediction accuracy, the present application provides a method for more accurately predicting the total intestinal digestible calcium and phosphorus content of pigs, so that the prediction result is real and reliable.

[0101] 2. Higher model stability and universality: the present application provides a prediction model with higher robustness and better generalization ability, which can adapt to different sources and batches of feed raw materials, and ensure the prediction stability under actual production conditions.

[0102] 3. Can mine complex data relationships: the present application provides a modeling method that can capture the complex linear relationship and interaction between features and target variables, breaking through the precision limit of traditional linear models.

[0103] The above scheme is only a description of a preferred example, but is not limited thereto. When implementing the present application, appropriate replacement and / or modification can be made according to user needs.

[0104] Although the embodiments of the present application have been disclosed as above, it is not limited to the applications listed in the specification and embodiments. It can be fully applied to various fields suitable for the present application. Additional modifications can be easily realized by those skilled in the art. Therefore, the present application is not limited to specific details and examples shown and described herein, without departing from the general concept defined by the claims and their equivalent scope.

Claims

1. A method for predicting the digestible calcium and phosphorus content of the whole intestine of growing pigs based on a linear model, characterized in that, include: S1. The collected dataset is processed by the preprocessing module to obtain an initial dataset containing input features and target variables, wherein the input features include: feed chemical composition, animal information, and experimental conditions; The target variables include: the total intestinal digestible content of calcium (ATTD_Ca) and the total intestinal digestible content of phosphorus (ATTD_P) as determined by digestion tests; S2. The initial dataset is analyzed and filtered through the feature engineering module to obtain data samples constructed from feature subsets that are compatible with the target variable. The feature subsets include body weight, total calcium, total phosphorus, and phytic acid phosphorus. S3. Construct linear prediction models related to the prediction of each target variable, and use data samples for training, optimization, and validation. S4. Import the characteristic data of the new feed formula to be predicted, complete the selection of data samples through S1-S2, and then obtain the predicted value of the target variable through the linear prediction model. In S3, the linear prediction model of ATTD_Ca is characterized by the following equation: ; In the above formula, For the regression constant, , , , These are the regression coefficients for the corresponding parameters, where weight is body weight, total-Ca is total calcium, and phytase is phytase. 2 This is the quadratic term of phytase. This is random error; The linear prediction model of ATTD_P is characterized by the following equation: ; In the above formula, For the regression constant, , , These are the regression coefficients for the corresponding parameters, and total-P represents total phosphorus. This is random error.

2. The method for predicting the digestible calcium and phosphorus content of the whole intestine of growing pigs based on a linear model as described in claim 1, characterized in that, In S1, the preprocessing module organizes the collected dataset in the following way: S10. Use the naniar:vis_miss() function in R language to detect missing values ​​in the dataset, delete the entire data with missing values ​​higher than the threshold, and fill the missing data with the mean or median of the same variety and the same stage of samples to complete the missing value processing. S11. Use box plots to identify missing value data to remove abnormal data points caused by measurement or recording errors. Abnormal data points refer to the distribution of variables shown by the box plot.

3. The method for predicting the digestible calcium and phosphorus content of the whole intestine of growing pigs based on a linear model as described in claim 1, characterized in that, In S2, the feature engineering module is configured to use the Pearson correlation coefficient to analyze the linear correlation between each input feature and the target variable; When the linear correlation coefficient r is greater than 0.6, it indicates that there is a strong linear correlation between the corresponding input feature and the target variable.

4. The method for predicting the digestible calcium and phosphorus content of the whole intestine of growing pigs based on a linear model as described in claim 1, characterized in that, In S3, after training, the linear prediction model of ATTD_Ca is characterized by the following equation: ; After training, the linear prediction model of ATTD_P is characterized by the following equation: 。 5. The method for predicting the digestible calcium and phosphorus content of the whole intestine of growing pigs based on a linear model as described in claim 1, characterized in that, In S3, the exponentially weighted error loss index I is used in the following formula. The linear prediction model for ATTD_Ca was validated: ; The exponentially weighted error loss index II in the following formula is used. The linear prediction model for ATTD_P was validated: ; In the above formula, R² is the coefficient of determination, RMSE is the root mean square error, and MAE is the mean absolute error.

Citation Information

Patent Citations

  • Feed additive composition

    CN103429093A

  • Method of predicting apparent full-intestinal digestion rate of phosphorus in pig feed through mathematical model

    CN108460235A