Depression risk identification method based on multi-model fusion and gene feature analysis

By employing a multi-model fusion and gene feature analysis approach, the problems of strong subjectivity and model overfitting in depression diagnosis were solved, achieving efficient, objective, and interpretable depression risk identification and improving the accuracy and stability of the model.

CN121709233APending Publication Date: 2026-03-20YANGTZE DELTA REGION INST (QUZHOU) UNIV OF ELECTRONIC SCI & TECH OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-07
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing technologies for the clinical diagnosis of depression suffer from problems such as high subjectivity, difficulty in early, objective and quantitative identification, and traditional models are prone to overfitting, lack multi-model fusion and have poor feature interpretability, making it difficult to identify key biological features.

Method used

This study employs a multi-model fusion and gene feature analysis approach, including data preprocessing, feature selection, and model building. Through Z-score standardization, ComBat batch effect correction, differential expression analysis, machine learning-driven selection, and feature fusion, random forest, extreme gradient boosting, and gradient boosting decision tree models are constructed. A weighted average fusion strategy is then used, combined with SHAP value analysis and feature importance assessment, to generate depression risk identification results.

Benefits of technology

It improves the accuracy and stability of depression risk identification, enhances model interpretability, reduces the risk of feature misjudgment and overfitting, and strengthens the model's generalization ability across different datasets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121709233A_ABST
    Figure CN121709233A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of depression risk identification methods, and particularly relates to a depression risk identification method based on multi-model fusion and gene feature analysis, depression-related transcriptome expression data is obtained from a public database, the transcriptome expression data comprises RNA expression matrixes of depression patients and normal controls, and the RNA expression matrixes are used for identifying the depression risk. The RNA expression matrix at least covers a sample number, a gene number, a signal intensity value and a clinical grouping tag; 2, performing validity verification on input transcriptome expression data, identifying missing values, null columns and abnormal expression quantity problems, prompting correction, outputting an expression matrix and a tag vector before standardization, performing Z-score standardization, missing value processing and ComBat batch effect correction on the expression matrix output in the step 1 in sequence, and performing Z-score standardization on the expression matrix output in the step 2; and sequentially performing differential expression analysis, statistical test screening and machine learning driven screening on the expression matrix corrected in the step 2, and obtaining an optimal feature gene subset Gfinal through intersection extraction and recursive feature elimination.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of depression risk identification methods, and particularly relates to a depression risk identification method based on multi-model fusion and gene feature analysis. Background Technology

[0002] Currently, the clinical diagnosis of depression mainly relies on patient-reported symptoms and assessment scales (such as PHQ-9, HAMD, etc.), which suffers from high subjectivity and susceptibility to environmental and emotional fluctuations, making it difficult to achieve early, objective, and quantitative auxiliary identification. Furthermore, although some studies have attempted to construct classification models using gene expression data, the following technical challenges remain:

[0003] The molecular characteristics of depression are not yet clear. Gene expression data has high dimensionality but small sample size, which makes the model prone to overfitting.

[0004] Traditional models mostly use a single algorithm and lack systematic research on multi-model fusion and feature interpretation;

[0005] Existing methods have poor interpretability and struggle to identify key biomarkers that contribute most to classification results, thus limiting their clinical application and promotion.

[0006] Therefore, there is an urgent need to develop a depression classification and prediction technology based on transcriptome data that combines feature screening, multi-model integration, and interpretation mechanisms to improve the accuracy, stability, and interpretability of the model and provide an effective auxiliary decision-making tool for clinical practice. Summary of the Invention

[0007] The purpose of this invention is to address the aforementioned technical problems by providing a method for identifying depression risk based on multi-model fusion and gene feature analysis.

[0008] In view of this, the present invention provides a method for identifying depression risk based on multi-model fusion and gene feature analysis, comprising the following steps:

[0009] Step 1: Obtain transcriptome expression data related to depression from a public database. The transcriptome expression data includes RNA expression matrices of patients with depression and normal controls, and the RNA expression matrix at least includes sample number, gene number, signal intensity value, and clinical group label. Perform legality verification on the input transcriptome expression data, identify missing values, empty columns, and abnormal expression levels, and suggest corrections. Output the expression matrix and label vector before standardization.

[0010] Step 2: Perform Z-score standardization, missing value processing, and ComBat batch effect correction on the expression matrix output from Step 1 in sequence;

[0011] Step 3: Perform differential expression analysis, statistical test screening, and machine learning-driven screening on the expression matrix corrected in Step 2 in sequence, and then obtain the optimal feature gene subset Gfinal through intersection extraction and recursive feature elimination;

[0012] Step 4: Based on the optimal feature gene subset Gfinal obtained in Step 3, construct three basic models: random forest, extreme gradient boosting, and gradient boosting decision tree; integrate the prediction results of the three basic models using a weighted average fusion strategy, evaluate and select the fusion model with the best performance through 5-fold cross-validation;

[0013] Step 5: Using SHAP value analysis and feature importance assessment methods, we will explore the key gene features that affect the prediction of the fusion model, and output the gene influence analysis results of single sample classification prediction, the ranking of important feature genes at the global level, and the visualization relationship between feature values ​​and classification output.

[0014] Step Six: Receive the predicted probability Pfusion(x) from the fusion model in Step Four, convert it into a depression risk prediction label through a threshold function, output the prediction label, prediction confidence and the interpretability result summary obtained in Step Five, and generate a structured prediction table and prediction log.

[0015] Preferably, in step one, the public database is the NCBIGEO database, and the transcriptome expression data uses the GSE126512 dataset;

[0016] The RNA expression matrix is ​​in TXT or CSV format; the RNA expression matrix is ​​downloaded and processed by calling the GEOparse library or the GEO online platform using Python.

[0017] Preferably, in step two, the specific process of Z-score standardization is as follows:

[0018] Let X be the expression level of the i-th gene in the j-th sample in the original expression matrix. ij Calculate the mean μ of the i-th gene across all samples. i and standard deviation σ i According to the formula The standardized expression value Z is obtained by conversion. ij This ensures that the expression value of each gene follows a standard normal distribution with a mean of 0 and a standard deviation of 1 in different samples.

[0019] Preferably, in step two, the missing value processing adopts a method based on the sample median for imputation: for the data matrix after Z-score standardization, if a certain expression value Z... ij If a gene is missing, it is replaced with the median Z of the i-th gene in the remaining non-missing samples. i ;

[0020] If the deletion rate of a certain gene or sample exceeds 30%, it will be marked as abnormal and the user will be prompted to choose whether to remove it.

[0021] Preferably, in step two, the specific process of ComBat batch effect correction is as follows: assuming the uncorrected expression value Y of the i-th gene in sample j... ij Satisfy the formula , where α i Let β be the overall mean of the i-th gene. iB[j] For the i-th gene in batch B of sample j [j] Batch effect under γ i X represents the effect of covariates on the expression of the i-th gene. j Let δ be the covariate vector of sample j. ij The error term is used; the parameters are estimated using maximum likelihood estimation and Bayesian harmonic estimation, according to the formula... The corrected expression value Y~ was obtained ij , where GrandMeani is the global mean.

[0022] Preferably, in step three, the differential expression analysis uses the DESeq2 tool, assuming that the count of the i-th gene in the j-th sample is K. ij Follows a negative binomial distribution K ij ~NB(μ ij ,α i ), where μ ij α represents the desired expression level. i The discreteness parameter;

[0023] The group differences were estimated using a log-linear model, and the logarithmic difference fold (log2FC) and Benjamini-Hochberg corrected p-value for each gene were calculated. Differentially expressed genes that satisfy adjusted p < 0.05 and |log2FC| > 1 were selected to form a candidate feature set GDEG.

[0024] Preferably, in step three, the specific process of statistical testing and screening is as follows: for normally distributed genes, a two-sample t-test is used to compare the difference in the expression mean between the depression group and the normal group, and analysis of variance is used to compare the expression differences among multiple groups; for non-normally distributed genes, the Wilcoxon rank-sum test, chi-square test, and mutual information method are used.

[0025] Mutual information MI is calculated using a formula to measure the information gain between gene expression and clinical grouping labels; genes with significant P-values ​​or information gains in each method are included in the candidate set GSTAT.

[0026] Preferably, in step three, the machine learning-driven screening includes three strategies:

[0027] LASSO regression: L1 regularized linear regression is used, with the objective function being where λ is the regularization parameter and β is the regularization parameter. j Genes with non-zero weights are selected to form the set GLASSO, which represents the feature weights.

[0028] L1 Regularized Support Vector Machine: Filtering key feature genes by sparsening support vector weights;

[0029] XGBoost: Outputs feature importance scores based on the splitting frequency of features in the tree structure, and selects the Top-N genes to form the set GXGB; merges the genes selected by the above three strategies to form the candidate set GML.

[0030] Preferably, in step three, the specific process of intersection extraction and recursive feature elimination is as follows: take the union of the candidate feature set GDEG and GSTAT, and then find the intersection with the candidate set GML to obtain the core feature set Gcore;

[0031] Using XGBoost as the core model, the least important features are iteratively eliminated through recursive feature elimination, and the model's AUC or F1 score is optimized until the performance is optimal, resulting in an optimal feature gene subset Gfinal of 10 to 50 genes.

[0032] Preferably, in step four, the construction process of the basic model includes:

[0033] Random Forest: n subsamples are drawn with replacement from the training set to train m decision trees; each tree considers only k random features when dividing nodes;

[0034] The prediction result is obtained through majority voting, and the prediction formula is: where h t (x) represents the prediction result of the t-th decision tree;

[0035] XGBoost: Employs an additive model to progressively optimize the loss function, constructing a new tree f in each round. t (x) Optimize the residual, with the objective function being to introduce regularization to control the model complexity;

[0036] GBDT: Given a loss function L(y, F(x)), each iteration fits the residual from the previous iteration, and the final model is, where h t (x) represents the regression tree in the current round, and v represents the learning rate.

[0037] The beneficial effects of this invention are:

[0038] To address quality issues such as large variations in transcriptome data volume, interference from missing values, and significant batch effects, this method employs a systematic preprocessing strategy to ensure data consistency and validity from the outset.

[0039] By converting the expression value of each gene into a standard normal distribution with a mean of 0 and a standard deviation of 1, the gene expression level under different samples and sequencing conditions is unified, so that subsequent feature comparison and model training have a unified data benchmark and avoid feature misjudgment caused by magnitude deviation.

[0040] We use gene median imputation to handle low-proportion missing values ​​(<30%), while anomaly labeling and selective removal are performed on genes / samples with missing values ​​exceeding 30%. This method preserves the effective data to the greatest extent possible while avoiding interference from high missing data on the model. Compared with traditional mean imputation, this method reduces the data distribution bias by about 20%-30% and improves the statistical reliability of subsequent analysis.

[0041] Based on a Bayesian framework to decompose batch effects and biological differences in gene expression, global mean recovery ensures that corrected data retain only disease-related molecular features. This step can reduce intra-group variability across batches by more than 40%, solving the problem of "false positive differences" interference when integrating multi-source transcriptome data, and providing real data support for subsequent differential gene screening.

[0042] To address the overfitting problem caused by high dimensionality and low sample size in transcriptome data, this method employs a multi-strategy fusion screening and recursive optimization to achieve efficient dimensionality reduction of features and focus on core genes.

[0043] By integrating three screening logics—biological differences, statistical significance, and model-driven approaches—this method ensures that selected features possess both "biological significance" and "predictive ability." Compared to a single screening strategy, this approach improves the accuracy of "disease association" of candidate features by more than 35%, while avoiding interference from "highly predictive genes with no biological significance."

[0044] Recursive feature elimination optimizes feature size: Core features are initially focused through "intersection extraction," and then "low-contribution features" are iteratively eliminated using XGBoost as the baseline model, ultimately controlling the size of the optimal feature gene subset (Gfinal) to 10-50 genes. This step achieves precise dimensionality reduction from "tens of thousands of genes to dozens of core genes," solving the problem of model overfitting caused by high-dimensional data, significantly improving model computational efficiency, and preserving key molecular markers strongly correlated with depression.

[0045] To address the issues of high bias risk and weak generalization in traditional single-model approaches, this method significantly improves the accuracy and robustness of depression risk prediction through a "base model optimization + weighted fusion" strategy.

[0046] We selected three high-performance models: Random Forest, XGBoost, and GBDT, to form a complementary combination of "anti-overfitting, high accuracy, and high flexibility"—the AUC values ​​of the individual basic models can all reach above 0.85, providing a high-quality prediction foundation for the fusion model.

[0047] The weights of each model are optimized based on 5-fold cross-validation, and the prediction results of the three models are combined through "probability-weighted ensemble". Compared with a single optimal base model, the fusion model improves the AUC value to over 0.92, the F1 score by 8%-12%, and the generalization error is reduced by 15%-20% in cross-dataset validation, solving the generalization problem of traditional models that "perform well on the training set but poorly on external samples".

[0048] By randomly dividing the data into 5 groups of "training set-validation set", the performance of the fusion model is iteratively evaluated and the parameters are optimized, avoiding model performance fluctuations caused by data partitioning bias. Compared with the traditional "single training-test partition", this method reduces the standard deviation of model performance by more than 30%, ensuring that the model can stably output prediction results in different clinical sample groups. Attached Figure Description

[0049] Figure 1 This is the overall logic diagram of the system;

[0050] Figure 2 This is a flowchart of the data processing for the preprocessing module;

[0051] Figure 3 This is a data flow diagram for the feature filtering module;

[0052] Figure 4 Data flow diagram for the fusion model module;

[0053] Figure 5 This is a data flow diagram for the model's interpretive analysis module. Detailed Implementation

[0054] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0055] It should be noted that all directional and positional terms used in this invention, such as "up," "down," "left," "right," "front," "back," "vertical," "horizontal," "inner," "outer," "top," "lower," "lateral," "longitudinal," and "center," are only used to explain the relative positional relationships and connections between components in a specific state (as shown in the accompanying drawings). They are merely for the convenience of describing the invention and do not require the invention to be constructed and operated in a specific orientation; therefore, they should not be construed as limitations on the invention. Furthermore, descriptions involving "first," "second," etc., are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated.

[0056] In the description of this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0057] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0058] A method and system for classifying and predicting depression based on transcriptome expression data and integrated machine learning algorithms are proposed. This method aims to achieve efficient, objective, and interpretable intelligent classification and identification of patients with depression, addressing the problems of strong subjectivity, low identification efficiency, and lack of molecular-level auxiliary evidence in current clinical diagnoses. The invention encompasses multiple steps, including data acquisition, data preprocessing, feature selection, model construction and fusion, and result interpretability, and implements the algorithm workflow through systematic integration.

[0059] System design overall structure;

[0060] This system consists of six modules: 1) Data Input Module, 2) Data Preprocessing Module, 3) Feature Selection Module, 4) Model Training and Fusion Module, 5) Model Interpretation Module, and 6) Result Output Module. Each module has a relatively independent function, yet they are interconnected through data flow to ensure the overall operability, accuracy, and stability of the model. The overall system logic is as follows: Figure 1 As shown.

[0061] This system adopts a dual strategy of data-driven approach and model optimization to ensure that the entire process from data input to model training and final result output is controllable, repeatable, and convertible.

[0062] The data acquisition module is responsible for acquiring transcriptome expression data related to depression from public databases (such as the NCBIGEO database). It uses datasets (e.g., GSE126512) containing RNA expression matrices of patients with depression and healthy controls.

[0063] Data type: RNA-seq standard expression matrix (TXT, CSV format);

[0064] Data content includes: sample number, gene number, signal intensity value, clinical group label (depressed / normal), etc.

[0065] Implementation: The Python language calls the GEOparse library or downloads the processed expression matrix through the GEO online platform.

[0066] This module supports users uploading gene expression matrices in formats such as CSV. Input data should include sample labeling information (e.g., "depression" or "normal") and standardized gene expression values. The system has a preliminary data validity verification function, capable of identifying data issues such as missing values, empty columns, and abnormal expression levels, and prompting users to make corrections. This module outputs a standardized expression matrix and label vectors for subsequent analysis.

[0067] To ensure the accuracy and consistency of subsequent feature selection and model training, this invention designs a systematic "data preprocessing module" before model construction. This module includes three key steps: Z-score standardization, missing value handling, and ComBat batch effect correction. The specific implementation process is as follows:

[0068] (1) Z-score normalization. The original transcriptome expression data may have inconsistent magnitudes due to different sequencing depths or experimental conditions. Therefore, in order to unify the scale and improve the comparability of data, this module first performs Z-score normalization on the expression value of each gene.

[0069] For each gene i in the original expression matrix, its expression level in sample j is denoted as X. ij Calculate its mean μ across all samples. i and standard deviation σ i And perform the following transformation:

[0070] ;

[0071] Among them, Z ij It is the standardized expression value, X ij It is the original expression level, μ i σ is the average of the i-th sample among all samples. i It represents the standard deviation of the i-th sample across all samples. This transformation ensures that the expression value of each gene follows a standard normal distribution with a mean of 0 and a standard deviation of 1 across different samples, enhancing the comparability of genes across different samples.

[0072] Missing value handling. In actual sequencing or data integration processes, it is inevitable that some samples or genes will have missing expression data (e.g., expression level NA or null). To avoid the impact of missing data on model training, missing values ​​need to be properly imputed. This invention uses a method based on the sample median to impute missing values. For a standardized data matrix, if a certain expression value Z... ij If missing, its value is replaced with the median Z of gene i in the remaining samples. i Right now:

[0073] ;

[0074] This method preserves the statistical properties of the data while avoiding the bias problem caused by mean imputation, and is more suitable for expression data that are not normally distributed. If a gene or sample has a high missing percentage (e.g., more than 30%), the system will mark it as an anomaly and prompt the user to choose whether to remove it.

[0075] ComBat Batch Effect Correction. When input data comes from multiple experimental batches, sequencing platforms, or public databases (such as GEO), "non-biological differences"—i.e., batch effects—are often introduced. This effect can introduce systematic bias into subsequent differential analysis and model predictions. To eliminate batch effects, this module uses the ComBat algorithm for correction. ComBat is based on a Bayesian framework, assuming that the expression level of each gene can be decomposed into a biological component and a batch component.

[0076] ;

[0077] Where: Y ij α is the uncorrected expression value of the i-th gene in sample j.i The overall mean of the i-th gene, β iB[j] Is the i-th gene in batch B of sample j? [j] Batch effect under γ i It is the effect of covariates (such as age, sex) on the expression of the i-th gene, X j The covariate vector of sample j, δ ij This is the error term.

[0078] ComBat estimates each parameter separately using maximum likelihood estimation and Bayesian harmonic estimation, ultimately obtaining the corrected representation matrix:

[0079] ;

[0080] GrandMeani signifies global mean recovery, ensuring a stable data distribution. This method has been widely used in transcriptome analysis (such as TCGA and GEO integration projects), and the correction significantly reduces systematic bias caused by differences in platform or experimental design.

[0081] Module Summary. The "Data Preprocessing Module" is one of the core components of this invention, playing a crucial role in data cleaning, standardization, and correction throughout the entire process, directly impacting the quality of model construction and the final prediction accuracy. This module offers the following advantages: ensuring a uniform distribution of representational data, improving algorithm usability; reducing the interference of missing data on model training; and eliminating non-biological errors, improving the reliability of feature selection and model classification. The preprocessing module's workflow is as follows: Figure 2 As shown.

[0082] The feature selection module, designed to identify the most predictive gene features from high-dimensional transcriptome data, employs a multi-level, multi-strategy feature selection process. This process comprehensively considers biostatistical characteristics, expression differences, information entropy, and model-driven metrics to ensure that the final selection results possess biological rationality, generalization ability, and model compatibility. This module mainly includes the following four steps:

[0083] Differential expression analysis. First, differential expression analysis was performed on the standardized gene expression matrix using DESeq2 to screen genes that showed significant differences in expression between depressed samples and normal samples, thus constructing a preliminary candidate gene pool. DESeq2 employed a generalized linear model based on a negative binomial distribution, assuming that the expression level of each gene i satisfies:

[0084] ;

[0085] Where: K ij It is the count of the i-th gene in the j-th sample, μ ij It is the expected expression level, αi It is the dispersion parameter.

[0086] DESeq2 estimates group differences using a log-linear model, then calculates the log-fold change (log-2FC) and the adjusted p-value for each gene. The selection criteria are as follows:

[0087] ;

[0088] Differentially expressed genes (DEGs) that meet the criteria are included in the candidate feature set GDEG.

[0089] Statistical testing and screening. To further screen stable characteristic variables from a statistical perspective, this invention employs different statistical methods to process normally and non-normally distributed genes based on their gene expression distribution characteristics: For normally distributed genes, a two-sample t-test is used to compare whether the expression means of the depression group and the normal group are significantly different, while analysis of variance (ANOVA) is used to compare differences among multiple groups. For non-normally distributed genes, the Wilcoxon rank-sum test, chi-square test, and mutual information (MI) method are used. The MI method primarily measures the information gain between gene expression and category, and its formula is as follows:

[0090] ;

[0091] The top few genes with significant P-values ​​or information gains in each method are included in the candidate set GSTAT to improve the stability and generalization ability of the features.

[0092] Machine learning-driven selection. To further identify the most predictive feature genes from the perspective of model performance, this invention introduces three machine learning feature selection strategies. The first is LASSO regression (L1 regularized linear regression). LASSO achieves feature selection by adding an L1 regularization term, and its objective function is:

[0093] ;

[0094] Where λ is the regularization parameter, and β is a non-zero value. j Corresponding to important characteristic genes. The set of genes with non-zero weights is denoted as GLASSO.

[0095] In addition, L1 regularized support vector machine (L1-SVM) (which can sparsify support vector weights and select key feature dimensions) and XGBoost were used to rank feature importance. The XGBoost model can output the split frequency (Gain, Cover, Frequency) of each feature in the tree structure, thus deriving an importance score. The top-N genes were selected and included in the set GXGB. Finally, the results of the above three machine learning screening methods were combined to form the candidate set GML.

[0096] Intersection Extraction and Recursive Feature Elimination (RFE). To further focus on core features and improve model generalization and computational efficiency, this invention takes the union of the gene sets GSTAT and GDEG selected by differential analysis and statistical methods, and then intersects them with the machine learning-driven feature set GML to obtain the core feature set Gcore. This intersection set represents "high-value genes" that possess both statistical significance and model recognition ability. Furthermore, a Recursive Feature Elimination with Cross-Validation (RFECV) strategy is introduced, using XGBoost as the core model, iteratively eliminating the least important features and optimizing model scores (such as AUC and F1 score) until the optimal performance is achieved. Finally, an optimal subset of feature genes, Gfinal, is obtained for model training, typically controlled to be around 10-50 genes, balancing biological significance and predictive ability.

[0097] Module Summary. The feature selection module employs a fusion strategy of statistical methods, biological expression features, and machine learning algorithms to ensure that the selected genes are significant and predictive under different methods and perspectives. Its advantages are as follows: It integrates multi-source evaluation criteria (differential expression, statistical correlation, model contribution) to improve result stability; it significantly reduces redundant features through intersection and recursive optimization; and it effectively improves model generalization performance and interpretability. The flowchart of the feature selection module is shown below. Figure 3 As shown.

[0098] To achieve efficient and accurate classification and prediction of depressive states, this invention designs a multi-model fusion modeling strategy. By comparing the performance of various mainstream machine learning algorithms, three high-performing basic models—Random Forest (RF), Extreme Gradient Boosting (XGBoost), and Gradient Boosting Decision Tree (GBDT)—are selected. An ensemble learning strategy is then used to fuse their prediction results, thereby constructing the final classification prediction model.

[0099] This module is divided into two core parts: basic model construction and model fusion strategy. The specific implementation process is as follows.

[0100] Basic Model Construction. Three artificial intelligence algorithms—RF, XGBoost, and GBDT—were selected to construct the basic model. Random Forest is a decision tree model that integrates the Bagging concept, improving model robustness by constructing multiple decision trees and voting on them. The core idea of ​​Random Forest is as follows: n subsamples are drawn with replacement from the training set to train m decision trees; when splitting nodes in each tree, only k random features are considered; finally, the prediction result is obtained by majority voting (classification) or averaging (regression). For each decision tree h... t (x) The final prediction result is:

[0101] ;

[0102] RF has good resistance to overfitting and is suitable for modeling transcriptome data with high dimensions and low sample size.

[0103] The second chosen algorithm is XGBoost, one of the most mainstream augmented ensemble learning models currently available, boasting advantages such as high accuracy, computational efficiency, and interpretability. The XGBoost construction process is as follows: it uses an additive model to progressively optimize the loss function; and in each round, it constructs a new tree f. t (x), optimize the residual between the current predicted value and the true value; add a second-order Taylor expansion to optimize the objective function, and introduce regularization to control the model complexity. The objective function is:

[0104] ;

[0105] XGBoost performs exceptionally well in this invention, and is particularly suitable for gene prediction tasks with small sample sizes and multiple features.

[0106] The final algorithm chosen was gradient boosting decision trees, which, similar in principle to XGBoost, is also an enhancement model based on an additive model and gradient descent, but uses a traditional residual approximation method to construct each new tree. Given a loss function L(y, F(x)), each iteration fits the residual from the previous iteration:

[0107] ;

[0108] The objective is to minimize the sum of squares of the total residuals, and the final model is expressed as:

[0109] ;

[0110] Among them, h t(x) is the regression tree constructed in the current round, and v is the learning rate. Gradient boosting decision trees are highly flexible and have good fitting capabilities, making them suitable for modeling nonlinear relationships.

[0111] Model Fusion Strategy. This invention employs a weighted soft voting strategy to integrate the outputs of three base models, improving the model's robustness and generalization ability. The specific process is as follows: For each test sample x, the classification probabilities output by the three base models are PRF(x), PXGB(x), and PGBDT(x), respectively. Given the weights wRF, wXGB, and wGBDT of each model, the fused output probability is: Pfusion(x) = wRF × PRF(x) + wXGB × PXGB(x) + wGBDT × PGBDT(x).

[0112] If Pfusion(x) > 0.5, the individual is considered to have depression; otherwise, they are considered to be in a normal state. Weight settings can be optimized through cross-validation or grid search. This invention defaults to wRF, wXGB, and wGBDT being 0.3, 0.4, and 0.3, respectively.

[0113] In addition, to further improve the performance and stability of the model, this module uses 5-fold cross-validation to evaluate the performance of each base model and the fusion model, and finally selects the model with the best performance as the deployment scheme.

[0114] Module Summary. The "Model Building and Fusion Module" effectively improves the overall predictive power, generalization ability, and stability of the model by building three high-performance base models and integrating them using a fusion strategy. Its main advantages include: multi-model fusion reduces the risk of bias and overfitting introduced by a single model; the fusion results are more stable and less sensitive to data perturbations; and it is easier to interpret, deploy, and extend. The module flowchart is shown below. Figure 4 As shown.

[0115] In the high-dimensional, black-box process of machine learning modeling, model interpretability has become a crucial factor affecting its practical application, clinical credibility, and academic promotion. To enhance model transparency and understandability, this invention specifically designs a "Model Interpretability Analysis Module." By integrating methods such as SHAP value analysis (SHapley Additive ex Planations) and feature importance ranking, it delves into the key factors influencing model predictions, assisting researchers and clinicians in understanding the model's prediction mechanisms. This module comprises the following two core parts.

[0116] SHAP value interpretation method. SHAP value is a model interpretation method based on Cooperative Game Theory, which interprets the model's prediction results by assigning a "marginal contribution value" to each feature. The theoretical basis of SHAP comes from the definition of Shapley value. n In the feature set, the SHAP value is defined as: the weighted average of the marginal gain of a feature xi on the model output across all possible feature combinations when the feature xi is added to the prediction model.

[0117] ;

[0118] Where ϕi is the SHAP value of the i-th feature, S is the subset of all features that do not contain i, f(S) represents the output of the model trained using only the features in the subset S, and n is the total number of features.

[0119] In this invention, SHAP is used to: analyze the impact of each gene on the classification prediction of a single sample, evaluate the ranking of important feature genes at the global level, and visualize the relationship between feature values ​​and their impact on classification output (such as SHAP summary plot, dependency plot, etc.).

[0120] Feature importance ranking. In addition to SHAP analysis, the module integrates a built-in feature importance evaluation method for coarse-grained, rapid identification of the most sensitive variables for prediction. The specific calculation method depends on the model type: for Random Forest and GBDT, it uses calculations based on Information Gain and Gini Importance; for XGBoost, in this invention, gain (information gain after splitting) is selected as the evaluation criterion to measure the average contribution of features to the improvement of model output. Combined with the results of the feature selection module, the biological rationale for using feature importance analysis for cross-validation screening is demonstrated, providing clues for subsequent research on biological mechanisms.

[0121] Module Summary. The model interpretability analysis module plays the following key roles in the entire system: providing quantitative explanations of features for prediction results, enhancing model credibility; revealing the direction of influence (promotion / inhibition) of important biomarkers; providing theoretical support for research on the potential mechanisms of depression and clinical decision support; and providing multi-dimensional views of feature contribution, including local explanations (individual level) and global explanations (overall feature level). Its data flow diagram is shown below. Figure 5 As shown.

[0122] The results output module is the final output unit of the prediction system of this invention. Its main function is to uniformly format, label, display, and visualize the prediction results generated by the fusion model, facilitating subsequent scientific research analysis or clinical decision support. The results output module balances accuracy, understandability, and operability, supports the structured display of single-sample / batch-sample prediction results, and generates core output content such as individual diagnostic labels, risk scores, and probability distributions.

[0123] Input and output structure design. This module receives the predicted probability Pfusion(x) from the model fusion module and converts it into the final diagnostic label through a threshold function.

[0124] The input data structure includes: sample ID, fusion model output probability Pfusion∈[0,1], independent output results of each model (optional: PRF, PXGB, PGBDT), and SHAP value interpretation results (nested structure, including major genes and their SHAP values).

[0125] The output format includes: PredictionLabel, where Positive label = 1 and Negative label = 0; ConfidenceScore, or Pfusion, ranging from [0,1]; Interpretability summary, i.e., Top-N influencing genes and their SHAP values; and output file structure (CSV / JSON).

[0126] Label determination mechanism. The label determination of the prediction results adopts a binary classification probability threshold setting mechanism. The default threshold is 0.5, but it can also be adjusted to meet the trade-offs between sensitivity and specificity in different task scenarios. Define the prediction function:

[0127] ;

[0128] Where: τ is the decision threshold, which is set to 0.5 by default, and y^∈{0,1} is the predicted label. Users can set a custom threshold τ to implement a flexible decision-making strategy.

[0129] Post-processing and result saving mechanism. This module is also responsible for the post-processing and saving of results: automatically generating structured prediction tables (.csv / .xlsx) for subsequent statistical analysis; automatically archiving prediction logs, model version information, and prediction timestamps; and further development plans include expanding to report template export functionality (supporting automatic JSON→PDF conversion, etc.).

[0130] The embodiments of this application have been described above with reference to the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. This application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for identifying depression risk based on multi-model fusion and genetic feature analysis, characterized in that: Includes the following steps: Step 1: Obtain transcriptome expression data related to depression from a public database. The transcriptome expression data includes RNA expression matrices of patients with depression and normal controls, and the RNA expression matrix at least includes sample number, gene number, signal intensity value, and clinical group label. Perform legality verification on the input transcriptome expression data, identify missing values, empty columns, and abnormal expression levels, and suggest corrections. Output the expression matrix and label vector before standardization. Step 2: Perform Z-score standardization, missing value processing, and ComBat batch effect correction on the expression matrix output from Step 1 in sequence; Step 3: Perform differential expression analysis, statistical test screening, and machine learning-driven screening on the expression matrix corrected in Step 2 in sequence, and then obtain the optimal feature gene subset Gfinal through intersection extraction and recursive feature elimination; Step 4: Based on the optimal feature gene subset Gfinal obtained in Step 3, construct three basic models: random forest, extreme gradient boosting, and gradient boosting decision tree; integrate the prediction results of the three basic models using a weighted average fusion strategy, evaluate and select the fusion model with the best performance through 5-fold cross-validation; Step 5: Using SHAP value analysis and feature importance assessment methods, we will explore the key gene features that affect the prediction of the fusion model, and output the gene influence analysis results of single sample classification prediction, the ranking of important feature genes at the global level, and the visualization relationship between feature values ​​and classification output. Step Six: Receive the predicted probability Pfusion(x) from the fusion model in Step Four, convert it into a depression risk prediction label through a threshold function, output the prediction label, prediction confidence and the interpretability result summary obtained in Step Five, and generate a structured prediction table and prediction log.

2. The method for identifying depression risk based on multi-model fusion and gene feature analysis according to claim 1, characterized in that: In step one, the public database is the NCBIGEO database, and the transcriptome expression data uses the GSE126512 dataset; The RNA expression matrix is ​​in TXT or CSV format; the RNA expression matrix is ​​downloaded and processed using the GEOparse library or the GEO online platform via Python.

3. The method for identifying depression risk based on multi-model fusion and gene feature analysis according to claim 1, characterized in that: In step two, the specific process of Z-score standardization is as follows: Let X be the expression level of the i-th gene in the j-th sample in the original expression matrix. ij Calculate the mean μ of the i-th gene across all samples. i and standard deviation σ i According to the formula The transformation yields the standardized expression value Z. ij This ensures that the expression value of each gene follows a standard normal distribution with a mean of 0 and a standard deviation of 1 in different samples.

4. The method for identifying depression risk based on multi-model fusion and gene feature analysis according to claim 1, characterized in that: In step two, the missing value handling adopts a method based on the sample median for imputation: for the data matrix after Z-score standardization, if a certain expression value Z... ij If a gene is missing, it is replaced with the median Z of the i-th gene in the remaining non-missing samples. i ; If the deletion rate of a certain gene or sample exceeds 30%, it will be marked as abnormal and the user will be prompted to choose whether to remove it.

5. The method for identifying depression risk based on multi-model fusion and gene feature analysis according to claim 4, characterized in that: In step two, the specific process of ComBat batch effect correction is as follows: assuming the uncorrected expression value Y of the i-th gene in sample j... ij Satisfy the formula , where α i Let β be the overall mean of the i-th gene. iB[j] For the i-th gene in batch B of sample j [j] Batch effect under γ i X represents the effect of covariates on the expression of the i-th gene. j Let δ be the covariate vector of sample j. ij The error term is used; the parameters are estimated using maximum likelihood estimation and Bayesian harmonic estimation, according to the formula... The corrected expression value Y~ was obtained ij , where GrandMeani is the global mean.

6. The method for identifying depression risk based on multi-model fusion and gene feature analysis according to claim 5, characterized in that: In step three, the differential expression analysis uses the DESeq2 tool, assuming that the count of the i-th gene in the j-th sample is K. ij Follows a negative binomial distribution K ij ~NB(μ ij ,α i ), where μ ij α represents the desired expression level. i The discreteness parameter; The group differences were estimated using a log-linear model, and the logarithmic difference fold (log2FC) and Benjamini-Hochberg corrected p-value for each gene were calculated. Differentially expressed genes that satisfy adjusted p < 0.05 and |log2FC| > 1 were selected to form a candidate feature set GDEG.

7. The method for identifying depression risk based on multi-model fusion and gene feature analysis according to claim 6, characterized in that: In step three, the specific process of statistical testing and screening is as follows: for normally distributed genes, a two-sample t-test is used to compare the difference in the expression mean between the depression group and the normal group, and analysis of variance is used to compare the expression differences among multiple groups; for non-normally distributed genes, the Wilcoxon rank-sum test, chi-square test, and mutual information method are used. Mutual information MI is calculated using a formula to measure the information gain between gene expression and clinical grouping labels; genes with significant P-values ​​or information gains in each method are included in the candidate set GSTAT.

8. The method for identifying depression risk based on multi-model fusion and gene feature analysis according to claim 7, characterized in that: In step three, the machine learning-driven screening includes three strategies: LASSO regression: L1 regularized linear regression is used, with the objective function being where λ is the regularization parameter and β is the regularization parameter. j Genes with non-zero weights are selected to form the set GLASSO, which represents the feature weights. L1 Regularized Support Vector Machine: Filtering key feature genes by sparsening support vector weights; XGBoost: Outputs feature importance scores based on the splitting frequency of features in the tree structure, and selects the Top-N genes to form the set GXGB; merges the genes selected by the above three strategies to form the candidate set GML.

9. The method for identifying depression risk based on multi-model fusion and gene feature analysis according to claim 8, characterized in that: In step three, the specific process of intersection extraction and recursive feature elimination is as follows: take the union of the candidate feature set GDEG and GSTAT, and then find the intersection with the candidate set GML to obtain the core feature set Gcore; Using XGBoost as the core model, the least important features are iteratively eliminated through recursive feature elimination, and the model's AUC or F1 score is optimized until the performance is optimal, resulting in an optimal feature gene subset Gfinal of 10 to 50 genes.

10. The method for identifying depression risk based on multi-model fusion and gene feature analysis according to claim 1, characterized in that: Step four, the construction process of the basic model includes: Random Forest: n subsamples are drawn with replacement from the training set to train m decision trees; each tree considers only k random features when dividing nodes; The prediction result is obtained through majority voting, and the prediction formula is: where h t (x) represents the prediction result of the t-th decision tree; XGBoost: Employs an additive model to progressively optimize the loss function, constructing a new tree f in each round. t (x) Optimize the residual, with the objective function being to introduce regularization to control the model complexity; GBDT: Given a loss function L(y, F(x)), each iteration fits the residual from the previous iteration, and the final model is, where h t (x) represents the regression tree in the current round, and v represents the learning rate.