A method for constructing a retention time prediction model of a compound in high performance liquid chromatography

By combining multi-strategy data preprocessing and the Bayesian optimization framework of the LightGBM model with the Huber Loss objective function, the data processing and hyperparameter optimization problems in HPLC compound retention time prediction were solved, achieving efficient and stable compound retention time prediction and improving the accuracy and efficiency of chromatographic analysis.

CN121905355BActive Publication Date: 2026-06-19SUZHOU UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SUZHOU UNIV
Filing Date
2026-03-23
Publication Date
2026-06-19

Smart Images

  • Figure CN121905355B_ABST
    Figure CN121905355B_ABST
Patent Text Reader

Abstract

This invention discloses a method for constructing a compound retention time prediction model in high-performance liquid chromatography (HPLC), relating to the field of machine learning technology. The method includes generating a candidate sample dataset; training a lightweight gradient booster regression model using the candidate sample dataset as input, and finding the optimal hyperparameter combination corresponding to the dataset using a Bayesian algorithm; training the lightweight gradient booster regression model using the candidate sample dataset with 10-fold cross-validation under the corresponding optimal hyperparameter combination to obtain an evaluation index; and using the model corresponding to the optimal evaluation index as the HPLC compound retention time prediction model and retaining the candidate sample dataset. This invention achieves efficient hyperparameter optimization by constructing a multi-strategy data configuration pool, using a LightGBM regression model combined with a Huber Loss objective function, and employing Bayesian optimization, ultimately ensuring model stability through cross-validation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for constructing a model for predicting the retention time of compounds in high-performance liquid chromatography, belonging to the field of machine learning technology. Background Technology

[0002] High-performance liquid chromatography (HPLC) is a core technology for the separation and qualitative and quantitative analysis of compounds in fields such as chemistry, biology, and medicine. The retention time of a compound is a key indicator for the identification and quantification of target compounds. Accurately predicting the retention time of a compound can significantly shorten the experimental optimization cycle, reduce experimental costs, and improve the reliability of analytical results.

[0003] Existing machine learning methods for predicting HPLC retention time mainly suffer from the following technical shortcomings:

[0004] The data preprocessing strategies are often simplistic: existing methods mostly employ single missing value handling strategies (such as mean imputation) or feature selection strategies (such as only deleting low-variance features), without considering the synergistic optimization of feature redundancy removal and data purity assurance. For example, some methods only imput missing values ​​by mean imputation, leading to data noise accumulation; some methods do not perform feature correlation filtering, causing model overfitting; a single preprocessing method is difficult to adapt to the complex distribution of missing values ​​and feature redundancy characteristics in chromatographic data, resulting in limited model generalization ability.

[0005] Hyperparameter optimization is inefficient: Traditional hyperparameter optimization methods (such as grid search and random search) suffer from strong blindness and insufficient traversal of the search space. Grid search requires a fixed parameter step size and is prone to getting trapped in local optima; random search relies entirely on probability sampling and cannot utilize historical experimental information to optimize the search direction. For the high-dimensional hyperparameter space of ensemble learning models such as LightGBM, traditional methods are not only time-consuming and verbose, but also struggle to uncover the model's optimal performance.

[0006] The loss function has weak anti-interference ability: Existing methods mostly use mean absolute error (MAE) or mean squared error (MSE) as the objective function. MAE has limited adaptability to data distribution, and MSE is highly sensitive to outliers. Outliers are prone to exist in chromatographic experimental data due to instrument errors, sample pretreatment deviations, and other factors, resulting in insufficient prediction accuracy and stability of existing models.

[0007] Insufficient model evaluation and stability assurance: Some methods evaluate model performance only through a single test set, without using cross-validation or only using low-fold cross-validation, which cannot fully verify the model's generalization ability on different data subsets, resulting in large performance fluctuations in practical applications.

[0008] Therefore, there is an urgent need for an HPLC retention time prediction method that takes into account the comprehensiveness of data preprocessing, the efficiency of hyperparameter optimization, the ability to resist outliers, and the stability of the model, in order to solve the bottleneck problems of existing technologies. Summary of the Invention

[0009] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for constructing a model for predicting the retention time of compounds in high performance liquid chromatography. This method involves constructing a multi-strategy data configuration pool, using a LightGBM regression model combined with a HuberLoss objective function, and achieving efficient hyperparameter optimization based on the Optuna Bayesian optimization framework. Finally, the stability of the model is ensured through cross-validation.

[0010] To achieve the above objectives, the present invention is implemented using the following technical solution:

[0011] This invention provides a method for constructing a model to predict the retention time of compounds in high-performance liquid chromatography, comprising:

[0012] S1. Obtain the high-performance liquid chromatography sample dataset;

[0013] S2. Process the high performance liquid chromatography sample datasets according to different preprocessing methods to obtain high performance liquid chromatography sample datasets after different preprocessing methods. These datasets and the high performance liquid chromatography sample datasets are used as candidate sample datasets.

[0014] S3. Initialize the lightweight gradient booster regression model;

[0015] S4. Take a set of candidate sample datasets as input, train the lightweight gradient booster regression model, and use the Bayesian algorithm to find the optimal combination of hyperparameters corresponding to the candidate sample dataset.

[0016] S5. Repeat S4 to obtain the optimal hyperparameter combination for all candidate sample datasets;

[0017] S6. Select a set of candidate sample datasets, and use the set of candidate sample datasets to train the lightweight gradient booster regression model under the corresponding optimal hyperparameter combination using the 10-fold cross-validation method to obtain the evaluation index.

[0018] S7. Repeat S6 to obtain the evaluation index corresponding to all candidate sample datasets. Use the lightweight gradient booster regression model corresponding to the optimal evaluation index as the compound retention time prediction model in high performance liquid chromatography and retain the candidate sample dataset.

[0019] Furthermore, the high-performance liquid chromatography (HPLC) sample dataset contains multiple HPLC sample datasets, wherein each HPLC sample dataset consists of input features and target labels;

[0020] The input features include experimental condition features and molecular descriptor features. The experimental condition features include experimental parameters that affect the retention time of the compound, and the molecular descriptor features include the structural properties of the compound.

[0021] The target label contains the actual retention time.

[0022] Furthermore, the preprocessing methods include low variance filtering, high correlation filtering, elimination method and filling method. The low variance filtering includes calculating the variance value of each input feature in the high performance liquid chromatography sample dataset. If the variance value is 0, the input feature is deleted; otherwise, it is retained.

[0023] The high correlation filtering includes calculating the Pearson correlation coefficient between any two input features in the high performance liquid chromatography sample dataset. If the Pearson correlation coefficient is greater than a preset threshold, one of the input features is deleted; otherwise, both are retained.

[0024] The elimination method includes traversing the high-performance liquid chromatography sample dataset and deleting input features with missing values;

[0025] The imputation method involves traversing the high-performance liquid chromatography sample dataset, calculating the median of the input feature for input features with missing values, and then filling in the missing values.

[0026] Furthermore, the number of candidate sample datasets is 6 groups, wherein the first group of candidate sample datasets is a high-performance liquid chromatography (HPLC) sample dataset, the second group of candidate sample datasets is an HPLC sample dataset after performing low variance filtering and high correlation filtering in sequence, the third group of candidate sample datasets is an HPLC sample dataset after performing elimination, the fourth group of candidate sample datasets is an HPLC sample dataset after performing low variance filtering, high correlation filtering and filling in sequence, the fifth group of candidate sample datasets is an HPLC sample dataset after performing low variance filtering, high correlation filtering and elimination in sequence, and the sixth group of candidate sample datasets is an HPLC sample dataset after performing low variance filtering, high correlation filtering and elimination in sequence.

[0027] Furthermore, the step of using a set of candidate sample datasets as input to train the lightweight gradient boosting regression model, and combining this with a Bayesian algorithm to find the optimal combination of hyperparameters corresponding to the candidate sample dataset, includes:

[0028] D1. Define the hyperparameter search space for this set of candidate sample datasets;

[0029] D2. Generate primary hyperparameter combinations by randomly sampling from the hyperparameter search space;

[0030] D3. Using the candidate sample dataset, train the lightweight gradient booster regression model with a 5-fold cross-validation method under the initial hyperparameter combination. During the training process of each fold, calculate the objective function, update the decision tree structure and weights of the lightweight gradient booster regression model according to the objective function, and make predictions on the validation set of each fold. Output the prediction retention time and calculate the mean absolute error of the fold based on the prediction retention time.

[0031] D4. Sum the mean absolute errors of each fold to obtain the mean absolute error average. Combine the mean absolute error average with the corresponding hyperparameters to form a parameter-mean absolute error average pair, and store the parameter-mean absolute error average pair in the historical test results.

[0032] D5. Based on the hyperparameter search space and historical experimental results, the hyperparameter combination is obtained by iteratively optimizing the hyperparameter search space using the TPE algorithm.

[0033] D6. Replace the initial hyperparameter combination with the new hyperparameter combination, and repeat D3~D5 until the maximum number of iterations is reached to obtain the optimal hyperparameter combination corresponding to the candidate sample dataset.

[0034] Furthermore, the hyperparameter search space includes parameters, parameter types, value ranges, and sampling distributions. The parameters include learning rate, number of leaf nodes, minimum number of samples per leaf node, maximum tree depth, feature sampling rate, sample sampling rate, L1 regularization coefficient, L2 regularization coefficient, and minimum loss reduction for node splitting / penalty coefficient for the number of leaf nodes.

[0035] Furthermore, the expression for the historical test results is as follows:

[0036]

[0037] in, Indicates the results of historical experiments. This represents the pair of mean absolute error and mean value of the i-th parameter. This represents the combination of hyperparameters obtained in the i-th iteration. This represents the average absolute error of the i-th iteration.

[0038] Furthermore, the expression for the objective function is:

[0039]

[0040]

[0041]

[0042]

[0043]

[0044] in, Indicates the first The objective function value of a certain fold in the 5-fold cross-validation of iterations. Indicates the number of samples. Represents the loss function. The loss function is represented by the first... The first partial derivative of the prediction retention time in the next iteration The loss function is represented by the first... The second-order partial derivative of the prediction retention time in the next iteration Indicates the first The newly added decision tree in the next iteration gives the prediction weights for the i-th sample. This represents the actual retention time of the i-th sample. Indicates the first The prediction retention time for the i-th sample in the next iteration. Indicates control parameters, Represents the regularization term. This represents the minimum loss reduction amount when a node splits. This indicates the number of leaf nodes in the decision tree. Represents the L2 regularization coefficient. Represents the L1 regularization coefficient. The weight vector representing the leaf node. Describing the L1 norm, This represents the L2 norm.

[0045] Furthermore, a set of candidate sample datasets is selected, and the lightweight gradient booster regression model is trained using 10-fold cross-validation with the corresponding optimal hyperparameter combination to obtain evaluation metrics, including:

[0046] A1. Select a set of candidate sample datasets;

[0047] A2. Using the candidate sample dataset, the lightweight gradient booster regression model is trained with 10-fold cross-validation under the corresponding optimal hyperparameter combination. Predictions are made on the validation set at each fold, and the predicted retention time is output.

[0048] A3. Calculate the evaluation index based on the predicted retention time. The evaluation index includes the mean absolute error (MAE) average and the standard deviation. The mean absolute error average is obtained by averaging the mean absolute errors of each fold.

[0049] Furthermore, the expressions for the mean absolute error and standard deviation are as follows:

[0050]

[0051]

[0052] in, Indicates the mean absolute error. This indicates the number of samples in the candidate sample dataset. This represents the actual retention time of the i-th sample. This represents the prediction retention time for the i-th sample. Indicates standard deviation, Indicates the number of cross-validation folds. Indicates the first The mean absolute error of the fold. express The average of the average absolute error;

[0053] When the difference in mean absolute error is within a preset range, the evaluation index with the smallest difference is selected as the optimal evaluation index.

[0054] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:

[0055] This invention achieves efficient hyperparameter optimization by constructing a multi-strategy data configuration pool, using the LightGBM regression model combined with the Huber Loss objective function, and based on the Optuna Bayesian optimization framework. Finally, the stability of the model is ensured through cross-validation.

[0056] The optimal configuration of the input dataset of this invention is "feature filtering + deletion of all missing rows + Huber loss function + Optuna hyperparameter tuning". After 10 cross-validations, the mean absolute error reaches 0.8003 and the standard deviation is 0.0487. It has the advantages of high prediction accuracy, strong stability, efficient parameter tuning and outstanding resistance to outlier interference. It can be widely used in the qualitative and quantitative analysis of compound retention time in HPLC experiments, significantly improving the efficiency and reliability of chromatographic analysis experiments. Attached Figure Description

[0057] Figure 1 This is a schematic flowchart of a method for constructing a retention time prediction model for compounds in high-performance liquid chromatography, according to one embodiment of the present invention. Detailed Implementation

[0058] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.

[0059] Example 1:

[0060] like Figure 1As shown, this embodiment of the invention provides a method for constructing a model for predicting the retention time of compounds in high-performance liquid chromatography, comprising the following steps:

[0061] Obtain a high-performance liquid chromatography (HPLC) sample dataset. The HPLC sample dataset contains multiple sample data of different compounds. Each sample data corresponds to an independent HPLC experiment record. Each sample dataset consists of two parts: input features (X) and target labels (Y).

[0062] Input features (X): These consist of 204 feature variables, specifically divided into two parts: experimental condition features and molecular descriptor features. Detailed explanations of each part are as follows:

[0063] (1) Experimental conditions characteristics (8 dimensions): This part describes the external operating environment in the chromatographic separation process, specifically including 8 key experimental parameters, including but not limited to mobile phase ratio, pH value, column temperature and flow rate. The above experimental parameters are used to quantify the influence of different experimental environments on the retention behavior of compounds, and provide a data basis for subsequent analysis of the relationship between experimental environment and retention effect.

[0064] (2) Molecular descriptor features (196 dimensions): This part is used to describe the intrinsic physicochemical properties of the compound to be tested. Specifically, it includes 196 numerical molecular descriptors, including but not limited to molecular weight, LogP, topological polar surface area (TPSA), and number of spin bonds. These descriptors are used to quantitatively characterize the structural properties of the compound from multiple dimensions and accurately reflect the influence of the compound’s own characteristics on its chromatographic behavior.

[0065] Target label (Y): Specifically, it is the actual retention time value of the corresponding compound measured by high performance liquid chromatography under the experimental conditions defined by the above input features (X), which serves as the target reference for subsequent data modeling and effect verification.

[0066] In this embodiment, the high-performance liquid chromatography sample dataset is organized in a two-dimensional structured table format. The arrangement rules are specifically divided into two aspects: row dimension and column dimension. Specifically:

[0067] Row dimension: The high performance liquid chromatography sample dataset contains 3275 rows of data. Each row of data corresponds to an independent sample, that is, each row of data corresponds to a specific high performance liquid chromatography experiment record of a compound, realizing independent differentiation and orderly arrangement of samples.

[0068] Column Dimensions: The high-performance liquid chromatography sample dataset contains a total of 206 columns of data. The first column is the sample index, which is used to uniquely identify each sample, facilitating sample query, retrieval, and traceability. The second column is the target variable, which is the retention time corresponding to the target label data (Y) mentioned above. The remaining 204 columns are feature variables, corresponding to the input features (X) mentioned above. Specifically, they include 8 dimensions of experimental condition features and 196 dimensions of molecular descriptor features, realizing an ordered correspondence between feature variables and target variables.

[0069] Next, the high-performance liquid chromatography (HPLC) sample datasets were processed according to different preprocessing methods to obtain HPLC sample datasets after different preprocessing methods. In this embodiment, the preprocessing methods include low variance filtering, high correlation filtering, elimination method, and filling method.

[0070] Low variance filtering: The variance of all feature columns in the high performance liquid chromatography sample dataset is calculated, and all feature columns with completely identical values ​​are deleted, that is, feature columns with variance of 0 in the original data. Such feature columns cannot provide effective information for subsequent data modeling, and deletion can reduce the amount of data processing.

[0071] High correlation filtering: Calculate the Pearson correlation coefficient between any two feature columns in the high performance liquid chromatography sample dataset. Set the correlation coefficient threshold to 0.95. If the Pearson correlation coefficient between any two feature columns is greater than 0.95, then the two feature columns are determined to be highly correlated features. Delete the feature columns that appear after the first appearance and keep the feature columns that appear first. This method effectively eliminates feature redundancy and avoids the impact of highly correlated features on the accuracy and efficiency of subsequent model training.

[0072] Elimination method: Directly delete sample rows containing any missing values.

[0073] Imputation: Calculate the median of each feature column, and use this median to fill in the missing values ​​in the corresponding feature column. The imputation formula is:

[0074]

[0075] in, Indicates the fill value. This represents the j-th input feature value of the i-th sample. This represents the set of all non-missing values ​​in the j-th feature column. This represents the median of the j-th feature column.

[0076] Based on the above preprocessing strategy combination, six candidate sample datasets are configured. The first candidate sample dataset is a high-performance liquid chromatography (HPLC) sample dataset (i.e., the original sample data). The second candidate sample dataset is an HPLC sample dataset after performing low variance filtering and high correlation filtering in sequence. The third candidate sample dataset is an HPLC sample dataset after performing elimination. The fourth candidate dataset is an HPLC sample dataset after performing low variance filtering, high correlation filtering, and fill method in sequence. The fifth candidate dataset is an HPLC sample dataset after performing low variance filtering, high correlation filtering, elimination, and fill method in sequence. The sixth candidate dataset is an HPLC sample dataset after performing low variance filtering, high correlation filtering, and elimination.

[0077] Initialize the Lightweight Gradient Boosting Machine (LightGBM) regression model.

[0078] The lightweight gradient booster regression model is trained, and the optimal combination of hyperparameters for each candidate sample dataset is found by combining the Bayesian algorithm.

[0079] In this embodiment, the model training process and the Bayesian hyperparameter optimization process are not performed synchronously, but are executed alternately and serially using an architecture of nested loops. The outer loop is for Bayesian hyperparameter optimization, which is responsible for macro-level guidance: at the beginning of each round, it samples and outputs a set of determined hyperparameters (such as learning rate, number of leaf nodes, etc.) based on the historical probability model. The inner loop is for LightGBM model training, which is responsible for micro-level execution: after receiving the hyperparameters assigned by the outer loop, the model starts an additive tree-building process, and the hyperparameters remain fixed during the tree-building process. When the inner model completes all tree-building iterations, it outputs the mean absolute error (MAE) as an evaluation metric. This metric is used as a feedback signal to be sent back to the outer Bayesian optimizer. The optimizer updates the surrogate model and generates the next set of hyperparameters based on the received data, ultimately achieving serial cooperation between the two.

[0080] For each candidate sample dataset, the specific process includes the following:

[0081] D1. Define the hyperparameter search space for this candidate sample dataset, including parameters, parameter types, value ranges, and sampling distribution. Specifically:

[0082] Learning rate (learning_rate): Search range Logarithmic uniform distribution sampling is used;

[0083] Number of leaf nodes (num_leaves): Search range Uniform distribution sampling is used;

[0084] Minimum number of leaf nodes (min_child_samples): Search range Uniform distribution sampling is used;

[0085] Maximum depth of the tree (max_depth): Search range Integer uniform distribution sampling is used;

[0086] Feature sampling rate (feature_fraction): Search range Uniform distribution sampling is used;

[0087] Sample sampling rate (bagging_fraction): Search range Uniform distribution sampling is used;

[0088] L1 regularization coefficient (reg_alpha): Search range Logarithmic distribution sampling is used;

[0089] L2 regularization coefficient (reg_lambda): Search range Logarithmic distribution sampling is used;

[0090] Minimum loss reduction per leaf node (min_split_loss) - Penalty factor: Search range Uniform distribution sampling is used.

[0091] D2. Generate primary hyperparameter combinations by randomly sampling from the hyperparameter search space. When the iterative optimization is first started, the optimizer adopts a random search mode and randomly and uniformly extracts hyperparameter combinations as primary hyperparameter combinations within the preset hyperparameter search space.

[0092] D3. Using this set of candidate sample datasets, a lightweight gradient booster regression model is trained using 5-fold cross-validation under the initial hyperparameter combination.

[0093] The objective function is computed on the training set at each fold, and the decision tree structure and weights of the lightweight gradient booster regression model are updated based on the objective function. The expression for the objective function is:

[0094]

[0095]

[0096]

[0097]

[0098]

[0099] in, Indicates the first The objective function value of a certain fold in the 5-fold cross-validation of iterations. Indicates the number of samples. This represents the loss function (in this example, the Huber Loss loss function). The loss function is represented by the first... The first partial derivative of the prediction retention time in the next iteration The loss function is represented by the first... The second-order partial derivative of the prediction retention time in the next iteration Indicates the first The newly added decision tree in the next iteration gives the prediction weights for the i-th sample. This represents the actual retention time of the i-th sample. Indicates the first The prediction retention time for the i-th sample in the next iteration. Indicates control parameters, Represents the regularization term. This represents the minimum loss reduction amount when a node splits. This indicates the number of leaf nodes in the decision tree. Represents the L2 regularization coefficient. Represents the L1 regularization coefficient. The weight vector representing the leaf node. Describing the L1 norm, This represents the L2 norm.

[0100] The core purpose of calculating the objective function is to guide the model in additive iterative updates. The specific adjustment logic is as follows:

[0101] In the t-th iteration, the objective function measures the current model (previous iterations). The model constructs a new decision tree based on the difference (i.e., residual) between the predicted and actual values ​​of the (trees). This tree does not directly fit the label y, but rather fits the aforementioned residual; by minimizing the objective function, the algorithm can automatically determine the feature split point (i.e., select the feature and its corresponding value that causes the objective function to decrease the most for splitting), and calculate the optimal weight w of the leaf node after splitting, thereby correcting the previous state to the greatest extent. The error of each tree can be reduced by continuously adding new trees, and the model's prediction error (Loss) gradually decreases until convergence.

[0102] In LightGBM training, the process of generating a new tree in each round is essentially a process of minimizing the objective function. Furthermore, during training, the decision tree structure and weights are updated entirely based on the calculated objective function value. The specific update rules include both structure updates and weight updates:

[0103] (1) Structure update (split point selection): The algorithm does not grow the tree randomly, but traverses the candidate split points of each feature and calculates the decrease in the objective function value before and after the split. Finally, the model forces the selection of the feature and corresponding value that can make the objective function decrease the most to split, thereby determining the topology of the tree.

[0104] (2) Weight update (leaf node output): After the structure of the tree is determined, all samples falling into the same leaf node share the same output weight. The optimal weight is calculated directly by setting the partial derivative of the objective function with respect to the weight to zero, ensuring that the weight can minimize the current residual to the greatest extent.

[0105] In this embodiment, the objective function employs a second-order Taylor expansion to accelerate the optimization process, which is achieved through two core mechanisms, specifically including:

[0106] a. The complex optimization problem is transformed into a quadratic programming problem, achieving a unified solution form. In traditional GBDT, for different loss functions (such as Huber Loss used in this embodiment), solving for the optimal leaf node weights usually requires iterative methods (such as linear search), but this method is computationally time-consuming. The LightGBM model, however, uses a second-order Taylor expansion to approximate any differentiable loss function L as a function of the unknown. The quadratic function allows for the unification of the mathematical form of the optimization objective without considering the complexity of its original loss function.

[0107] b. Direct calculation of leaf node weights is achieved; since the objective function is approximated as a quadratic function, the optimal leaf node weights can be derived directly by finding the derivative to be zero. The analytical solution is defined by the following formula:

[0108]

[0109] This function does not require multiple iterations to approximate the optimal value at each leaf node; it only needs to use the current first derivative. and second derivative The optimal weight can be calculated in one step; at the same time, and The computation can be parallelized along the data sample dimension, further improving computational efficiency.

[0110] In summary, the second-order Taylor expansion simplifies complex nonlinear optimization problems into simple quadratic equation solving problems, greatly reducing the computational complexity of each iteration and thus significantly accelerating the model training process.

[0111] Make predictions on the validation set for each fold, output the predicted retention time, and calculate the mean absolute error of that fold based on the predicted retention time.

[0112] The termination condition for each training round is dynamically determined by combining the maximum iteration limit and the early stopping mechanism. First, the maximum number of base learners is preset. (In this embodiment, the value is set to 1000), and the early stopping tolerance threshold is set to 50 consecutive iterations. After each iteration (adding a new decision tree), the model calculates the current prediction error (MAE) in real time. When the early stopping condition is met or the upper limit is reached, the training of a single iteration terminates. The specific conditions are described below:

[0113] a. Triggering early stopping: When the validation set error has not decreased further in 50 consecutive iterations, it indicates that the model has reached its best generalization ability. At this time, the system will extract the model state corresponding to the historical best iteration as the final output.

[0114] b. Reaching the upper limit: If early stopping is not triggered during the iteration process, the model will stop when the number of decision trees generated reaches the preset limit. When this happens, the model training will automatically terminate.

[0115] D4. Sum the mean absolute errors of each fold to obtain the average mean absolute error (MAE). Combine the average MAE with the corresponding hyperparameters to form parameter-mean absolute error pairs, and store these pairs in the historical test results. The historical test results are accumulated over training iterations, and their expression is:

[0116]

[0117] in, Indicates the results of historical experiments. This represents the pair of mean absolute error and mean value of the i-th parameter. This represents the combination of hyperparameters obtained in the i-th iteration. This represents the average absolute error of the i-th iteration.

[0118] D5. Based on the hyperparameter search space and historical experimental results, the hyperparameter combination is obtained by iteratively optimizing the hyperparameter search space using the TPE algorithm.

[0119] D6. Replace the initial hyperparameter combination with the new hyperparameter combination, and repeat D3~D5 until the maximum number of iterations is reached (100 times in this example) to obtain the optimal hyperparameter combination corresponding to the candidate sample dataset.

[0120] Replace the candidate sample dataset with the one above and repeat steps D1 to D6 to obtain the optimal hyperparameter combination for all candidate sample datasets.

[0121] Using this candidate dataset, a lightweight gradient booster regression model was trained with 10-fold cross-validation under the corresponding optimal hyperparameter combination, and evaluation metrics were obtained, including:

[0122] A1. Select a set of candidate sample datasets;

[0123] A2. Using the candidate sample dataset, the lightweight gradient booster regression model is trained with 10-fold cross-validation under the corresponding optimal hyperparameter combination. Predictions are made on the validation set at each fold, and the predicted retention time is output.

[0124] A3. Calculate the evaluation indicators based on the predicted retention time. These indicators include the mean absolute error (MAE) and standard deviation. The MAE is obtained by summing the MAEs obtained from each fold and dividing by 10. The expressions for MAE and standard deviation are as follows:

[0125]

[0126]

[0127] in, Indicates the mean absolute error. This indicates the number of samples in the candidate sample dataset. This represents the actual retention time of the i-th sample. This represents the prediction retention time for the i-th sample. Indicates standard deviation, Indicates the number of cross-validation folds. Indicates the first The mean absolute error of the fold. express The average of the average absolute error.

[0128] A4. Repeat A1~A3 to obtain the evaluation metrics corresponding to all candidate sample datasets.

[0129] When the difference in mean absolute error is within a preset range, the evaluation index with the smallest difference is selected as the optimal evaluation index. The lightweight gradient booster regression model corresponding to the optimal evaluation index is used as the retention time prediction model for compounds in high-performance liquid chromatography, and this set of candidate sample datasets is retained.

[0130] Comparative Example 1:

[0131] Based on Example 1, the only difference between this comparative example and Example 1 is that the loss function in the objective function is replaced with the mean absolute error (MAE).

[0132] The mean absolute error and standard deviation of the optimal hyperparameter combinations corresponding to the six candidate sample datasets of Example 1 and Comparative Example 1 after performing 10-fold cross-validation are shown in Table 1:

[0133] Table 1: Evaluation metrics for the 6 candidate sample datasets of Example 1 and Comparative Example 1

[0134]

[0135] As can be seen from the data in Table 1, for serial number 11 (MAE=0.7982, Std=0.0721) and serial number 12 (MAE average=0.8003, Std=0.0487), based on the acceptable range of MAE average difference ≤0.01, the selection principle of prioritizing the minimum standard deviation is adopted. Finally, the optimal configuration is determined to be serial number 12, whose data processing scheme is "feature filtering + deletion of all missing rows", the objective function is Huber Loss, and the hyperparameters are the optimal combination after Optuna tuning.

[0136] The optimal model corresponding to serial number 12 was used as the retention time prediction model for compounds in high performance liquid chromatography. The MAE was calculated on the validation set of each fold in its 10-fold cross-validation, and the results are shown in Table 2.

[0137] Table 2: MAE calculation results for each fold in the 10-fold cross-validation of the optimal model.

[0138]

[0139] As shown in Table 2, the MAE fluctuation range of the model in each compromise is 0.7282~0.8680, the average MAE is around 0.80, and the standard deviation is only 0.0487. This effectively verifies the high stability and generalization ability of the high performance liquid chromatography compound retention time prediction model obtained by the method of the present invention.

[0140] The high-performance liquid chromatography (HPLC) retention time prediction model obtained by the method of this invention, when applied, inputs the molecular descriptor of the compound sample to be predicted and the experimental condition characteristics (preprocessed by "feature screening + deletion of missing samples") into the optimal model, and outputs the predicted retention time value. Comparison with experimentally measured values ​​shows that the MAE of the prediction result is 0.796, consistent with the cross-validation results, verifying the reliability of the model in practical applications.

[0141] This invention achieves high-precision and high-stability prediction of HPLC compound retention times through a synergistic innovation of multi-strategy data preprocessing, combining the LightGBM model with the Huber Loss loss function, and Optuna Bayesian hyperparameter optimization. This method is simple to operate, widely adaptable, and highly practical, effectively addressing the shortcomings of existing technologies and providing efficient and reliable technical support for chromatographic analysis.

[0142] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for constructing a model to predict the retention time of compounds in high-performance liquid chromatography, characterized in that, include: S1. Obtain the high-performance liquid chromatography sample dataset; S2. Process the high performance liquid chromatography sample datasets according to different preprocessing methods to obtain high performance liquid chromatography sample datasets after different preprocessing methods. These datasets and the high performance liquid chromatography sample datasets are used as candidate sample datasets. S3. Initialize the lightweight gradient booster regression model; S4. Using a set of candidate sample datasets as input, train the lightweight gradient boosting machine regression model, and combine it with the Bayesian algorithm to find the optimal combination of hyperparameters corresponding to the candidate sample dataset, including: D1. Define the hyperparameter search space for this set of candidate sample datasets; D2. Generate primary hyperparameter combinations by randomly sampling from the hyperparameter search space; D3. Using the candidate sample dataset, train the lightweight gradient booster regression model with a 5-fold cross-validation method under the initial hyperparameter combination. During the training process of each fold, calculate the objective function, update the decision tree structure and weights of the lightweight gradient booster regression model according to the objective function, and make predictions on the validation set of each fold. Output the prediction retention time and calculate the mean absolute error of the fold based on the prediction retention time. D4. Sum the mean absolute errors of each fold to obtain the mean absolute error average. Combine the mean absolute error average with the corresponding hyperparameters to form a parameter-mean absolute error average pair, and store the parameter-mean absolute error average pair in the historical test results. D5. Based on the hyperparameter search space and historical experimental results, the hyperparameter combination is obtained by iteratively optimizing the hyperparameter search space using the TPE algorithm. D6. Replace the initial hyperparameter combination with the hyperparameter combination, and repeat D3~D5 until the maximum number of iterations is reached to obtain the optimal hyperparameter combination corresponding to the candidate sample dataset. S5. Repeat S4 to obtain the optimal hyperparameter combination for all candidate sample datasets; S6. Select a set of candidate sample datasets, and use the set of candidate sample datasets to train the lightweight gradient booster regression model under the corresponding optimal hyperparameter combination using the 10-fold cross-validation method to obtain the evaluation index. S7. Repeat S6 to obtain the evaluation index corresponding to all candidate sample datasets. Use the lightweight gradient booster regression model corresponding to the optimal evaluation index as the compound retention time prediction model in high performance liquid chromatography and retain the candidate sample dataset.

2. The method according to claim 1, wherein the method is characterized by, The high-performance liquid chromatography (HPLC) sample dataset contains multiple HPLC sample datasets, where each HPLC sample dataset consists of input features and target labels; The input features include experimental condition features and molecular descriptor features. The experimental condition features include experimental parameters that affect the retention time of the compound, and the molecular descriptor features include the structural properties of the compound. The target label contains the actual retention time.

3. The method for constructing a retention time prediction model for compounds in high-performance liquid chromatography according to claim 2, characterized in that, The preprocessing methods include low variance filtering, high correlation filtering, elimination method and filling method. The low variance filtering method includes calculating the variance value of each input feature in the high performance liquid chromatography sample dataset. If the variance value is 0, the input feature is deleted; otherwise, it is retained. The high correlation filtering includes calculating the Pearson correlation coefficient between any two input features in the high performance liquid chromatography sample dataset. If the Pearson correlation coefficient is greater than a preset threshold, one of the input features is deleted; otherwise, both are retained. The elimination method includes traversing the high-performance liquid chromatography sample dataset and deleting input features with missing values; The imputation method involves traversing the high-performance liquid chromatography sample dataset, calculating the median of the input feature for input features with missing values, and then filling in the missing values.

4. The method according to claim 3, wherein the method is characterized by, The number of candidate sample datasets is 6 groups. The first group of candidate sample datasets is a high-performance liquid chromatography (HPLC) sample dataset. The second group of candidate sample datasets is an HPLC sample dataset after performing low variance filtering and high correlation filtering in sequence. The third group of candidate sample datasets is an HPLC sample dataset after performing elimination. The fourth group of candidate sample datasets is an HPLC sample dataset after performing low variance filtering, high correlation filtering and filling in sequence. The fifth group of candidate datasets is an HPLC sample dataset after performing low variance filtering, high correlation filtering and elimination in sequence. The sixth group of candidate datasets is an HPLC sample dataset after performing low variance filtering, high correlation filtering and elimination in sequence.

5. The method for constructing a retention time prediction model for compounds in high-performance liquid chromatography according to claim 1, characterized in that, The hyperparameter search space includes parameters, parameter types, value ranges, and sampling distributions. The parameters include learning rate, number of leaf nodes, minimum number of samples per leaf node, maximum tree depth, feature sampling rate, sample sampling rate, L1 regularization coefficient, L2 regularization coefficient, and minimum loss reduction for node splits / penalty coefficient for the number of leaf nodes.

6. The method for constructing a retention time prediction model for compounds in high-performance liquid chromatography according to claim 1, characterized in that, The expression for the historical test results is: ; in, Indicates the results of historical experiments. This represents the pair of mean absolute error and mean value of the i-th parameter. This represents the combination of hyperparameters obtained in the i-th iteration. This represents the average absolute error of the i-th iteration.

7. The method for constructing a retention time prediction model for compounds in high-performance liquid chromatography according to claim 1, characterized in that, The expression for the objective function is: ; ; ; ; ; in, Indicates the first The objective function value of a certain fold in the 5-fold cross-validation of iterations. Indicates the number of samples. Represents the loss function. The loss function is represented by the first... The first partial derivative of the prediction retention time in the next iteration The loss function is represented by the first... The second-order partial derivative of the prediction retention time in the next iteration Indicates the first The newly added decision tree in the next iteration gives the prediction weights for the i-th sample. This represents the actual retention time of the i-th sample. Indicates the first The prediction retention time for the i-th sample in the next iteration. Indicates control parameters, Represents the regularization term. This represents the minimum loss reduction amount when a node splits. This indicates the number of leaf nodes in the decision tree. Represents the L2 regularization coefficient. Represents the L1 regularization coefficient. The weight vector representing the leaf node. Describing the L1 norm, This represents the L2 norm.

8. The method for constructing a retention time prediction model for compounds in high-performance liquid chromatography according to claim 1, characterized in that, The process involves selecting a set of candidate sample datasets and using this set of candidate sample datasets to train a lightweight gradient booster regression model under the corresponding optimal hyperparameter combination using 10-fold cross-validation, thereby obtaining evaluation metrics, including: A1. Select a set of candidate sample datasets; A2. Using the candidate sample dataset, the lightweight gradient booster regression model is trained with 10-fold cross-validation under the corresponding optimal hyperparameter combination. Predictions are made on the validation set at each fold, and the predicted retention time is output. A3. Calculate the evaluation index based on the predicted retention time. The evaluation index includes the mean absolute error (MAE) average and the standard deviation. The mean absolute error average is obtained by averaging the mean absolute errors of each fold.

9. The method for constructing a retention time prediction model for compounds in high-performance liquid chromatography according to claim 8, characterized in that, The expressions for the mean absolute error and standard deviation are as follows: ; ; in, Indicates the mean absolute error. This indicates the number of samples in the candidate sample dataset. This represents the actual retention time of the i-th sample. This represents the prediction retention time for the i-th sample. Indicates standard deviation, Indicates the number of cross-validation folds. Indicates the first The mean absolute error of the fold. express The average of the average absolute error; When the difference in mean absolute error is within a preset range, the evaluation index with the smallest difference is selected as the optimal evaluation index.

Citation Information

Patent Citations

  • Peptide fragment liquid chromatogram retention time prediction method and system

    CN106248844A

  • Method for predicting retention time of liquid chromatogram under different chromatographic conditions

    CN118243842A