A clustering analysis-based sub-group classification method for patients with chronic heart failure
By identifying density distribution and nearest neighbor propagation in a high-dimensional feature space and combining it with a pre-trained model, the instability and semantic lack of patient subgroup classification in existing technologies are solved, and robust and interpretable subgroup classification of chronic heart failure patients is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG PROVINCIAL HOSPITAL AFFILIATED TO SHANDONG FIRST MEDICAL UNIVERSITY (SHANDONG PROVINCIAL HOSPITAL)
- Filing Date
- 2026-05-18
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies struggle to automatically identify stable patient subgroups from complex, heterogeneous data and automatically associate them with known clinical knowledge systems. Conventional clustering algorithms suffer from instability and a lack of clinical semantics in processing high-dimensional, nonlinear medical data.
By acquiring heterogeneous data from multiple sources, performing feature engineering operations to generate a structured feature set, mapping it to a high-dimensional feature space, calculating the density distribution to identify the core region, determining the category affiliation based on the nearest neighbor propagation principle, and using a pre-trained subtype decision model to output clinical subtype labels, thus achieving automated relabeling.
The generated patient segmentation scheme has strong internal consistency and clear boundaries, can adapt to complex high-dimensional spatial structures, and provides clinically interpretable subtype classification results that are directly related to prognostic risks or treatment strategies.
Smart Images

Figure CN122201800B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical data analysis technology, specifically to a method for classifying subgroups of patients with chronic heart failure based on cluster analysis. Background Technology
[0002] Chronic heart failure exhibits high clinical heterogeneity, and accurate subgrouping of patients is crucial for personalized management. Current techniques primarily rely on clinical guidelines and expert experience, classifying patients based on a limited number of specific indicators. This rule-based approach struggles to integrate the increasingly rich and diverse patient data from multiple sources, including clinical signs, laboratory results, imaging features, and molecular biological information, resulting in a single classification dimension that fails to fully reveal the complex structure within the population.
[0003] Using unsupervised machine learning for data-driven patient clustering is another technical approach. However, conventional clustering algorithms face inherent limitations when dealing with such high-dimensional, non-linear medical data. These methods typically rely on a pre-defined number of clusters or similarity metrics based on global distance, are sensitive to initial parameter settings, and distance metrics are prone to failure in high-dimensional spaces. Their clustering results are often unstable, and the generated categories are merely mathematical groupings lacking direct clinical semantics. Clinical meaning must be assigned through manual posterior analysis, a cumbersome and subjective process.
[0004] Existing technologies have failed to effectively address the problem of automatically identifying stable patient subgroups from complex, heterogeneous data and automatically associating them with known clinical knowledge systems. This necessitates a novel classification method that can overcome the instability of high-dimensional data clustering and achieve an automated, objective mapping of clustering results to clinically interpretable subtypes. Summary of the Invention
[0005] The purpose of this invention is to provide a method for classifying subgroups of patients with chronic heart failure based on cluster analysis, so as to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides a method for classifying subgroups of patients with chronic heart failure based on cluster analysis, the method comprising:
[0007] Obtain an initial dataset of chronic heart failure patients composed of multiple heterogeneous data sources;
[0008] Feature engineering operations are performed on the initial dataset of patients with chronic heart failure to generate a set of structured features;
[0009] The structured feature set is mapped to a high-dimensional feature space, and the density distribution of each data point in the high-dimensional feature space is calculated.
[0010] Based on the density distribution results, multiple core regions were identified in the high-dimensional feature space;
[0011] Initial category identifiers are assigned to the core region, and the category membership of the remaining data points in the high-dimensional feature space is determined based on the nearest neighbor propagation principle.
[0012] Integrate the category affiliation relationships of all data points to generate a patient clustering scheme;
[0013] Based on the patient clustering scheme, extract the discriminative feature patterns for each category from the structured feature set;
[0014] The discriminative feature patterns are input into the pre-trained subtype decision model, which outputs a clinical subtype label corresponding to each category.
[0015] Finally, the patient clustering scheme was relabeled based on clinical subtype labels to form the final classification results of chronic heart failure patient subgroups.
[0016] Preferably, the step of performing feature engineering operations on the initial dataset of chronic heart failure patients to generate a structured feature set includes:
[0017] Data fusion was performed on the initial dataset of chronic heart failure patients from heterogeneous data sources to create a temporary data warehouse under a unified patient identifier;
[0018] The time series data in the temporary data warehouse is segmented by a sliding window, and statistics are calculated within each time window to transform the time series data into a window feature sequence.
[0019] Simultaneously, non-time-series data in the temporary data warehouse is encoded and standardized to generate static feature vectors;
[0020] The window feature sequence from the same unified patient identifier is horizontally concatenated with the static feature vector to form the multidimensional feature vector of the unified patient.
[0021] The multidimensional feature vectors of all patients are collected to form the structured feature set.
[0022] Preferably, the step of mapping the structured feature set to a high-dimensional feature space and calculating the density distribution of each data point in the high-dimensional feature space includes:
[0023] The structured feature set is processed using a nonlinear transformation method, which projects each multidimensional feature vector to a higher-dimensional space to obtain a high-dimensional feature vector.
[0024] In a high-dimensional feature space, a local neighborhood is defined with the point represented by each high-dimensional feature vector as the center.
[0025] Calculate the number of other high-dimensional feature vectors that fall within the local neighborhood of each high-dimensional feature vector, and record the number as the local density value of the high-dimensional feature vector;
[0026] By traversing all high-dimensional feature vectors, the density distribution of the high-dimensional feature space composed of all local density values is obtained.
[0027] Preferably, based on the density distribution results, multiple core regions are identified in the high-dimensional feature space, including:
[0028] A dynamic threshold for local density values is set, which is automatically calculated based on the statistical distribution of all local density values.
[0029] High-dimensional feature vectors whose local density values exceed the dynamic threshold are selected from the density distribution, and these high-dimensional feature vectors are marked as seed points.
[0030] Each seed point is used as the starting point for growth, and it is connected to other seed points in the local neighborhood whose density value exceeds the dynamic threshold to form a connected region;
[0031] Each connected region is defined as a core region, and a unique region identifier is generated for each core region.
[0032] Preferably, the determination of the category membership of the remaining data points in the high-dimensional feature space based on the nearest neighbor propagation principle includes:
[0033] Identify the remaining high-dimensional feature vectors that were not labeled as seed points in the high-dimensional feature space;
[0034] For each remaining high-dimensional feature vector, calculate its distance to all representative points of the core regions, where the representative points are seed points with the highest local density values within each core region.
[0035] Select the minimum value from all distances, and assign the region identifier of the core region corresponding to the minimum value to the current remaining high-dimensional feature vector;
[0036] After assigning identifiers to all remaining high-dimensional feature vectors, all high-dimensional feature vectors with the same region identifier are classified into the same category, thus completing the determination of the category affiliation.
[0037] Preferably, the extraction of discriminative feature patterns for each category from the structured feature set includes:
[0038] Based on the category affiliation, all multidimensional feature vectors belonging to the same category are separated from the structured feature set to form a category feature subset;
[0039] For each feature dimension, calculate its distribution statistics within the category and its global distribution statistics for the subset of category features.
[0040] By comparing the in-class distribution statistics of each feature dimension with the global distribution statistics, a feature discrimination score is calculated.
[0041] Within each category, all features are sorted according to their feature discrimination scores, and a predetermined number of features and their statistics are selected from the top-ranked features and combined to form the discriminative feature pattern corresponding to the category.
[0042] Preferably, the step of inputting the discriminative feature pattern into the pre-trained subtype decision model and outputting a clinical subtype label corresponding to each category includes:
[0043] Provide the pre-trained subtype decision model, which is a decision tree model trained based on historical expert-annotated subtype data of chronic heart failure patients;
[0044] The discriminative feature patterns corresponding to each category are transformed into an input vector format acceptable to the decision tree model;
[0045] The input vectors are fed into the decision tree model in sequence. Starting from the root node, the decision tree model traverses downwards along different branches based on the comparison between the values of specific features in the input vectors and the preset splitting thresholds.
[0046] Finally, the decision tree model reaches its leaf node, where the predefined labels stored are the output clinical subtype labels. Each category is assigned a unique clinical subtype label.
[0047] Preferably, the relabeling of the patient clustering scheme based on clinical subtype labels to form the final classification result of chronic heart failure patient subgroups includes:
[0048] Establish a mapping table to associate the category numbers defined by the region identifier in the patient clustering scheme with the clinical subtype labels output by the decision tree model;
[0049] Based on the mapping table, all patient records belonging to the same category in the patient clustering scheme are uniformly updated with their category identifiers to the corresponding clinical subtype labels;
[0050] Perform consistency checks on the updated classification results to ensure that each patient has one and only one valid clinical subtype label;
[0051] The classification results that pass the consistency check will be stored in a structured format, and the structured storage results are the classification results of the chronic heart failure patient subgroup.
[0052] Preferably, after the final classification of chronic heart failure patient subgroups is formed, an iterative optimization step for the classification results is also included:
[0053] Using the classification results of the chronic heart failure patient subgroups, the most discriminative feature subset is selected from the structured feature set.
[0054] The original structured feature set is replaced by the selected feature subset, and the high-dimensional feature space mapping and all subsequent steps are re-executed to generate new subgroup classification results.
[0055] Calculate the degree of difference between the new subgroup classification results and the previous round of subgroup classification results;
[0056] If the difference is greater than the preset convergence threshold, the new subgroup classification result is used as input, and the step of reverse screening from the structured feature set to select the most discriminative feature subset is re-executed.
[0057] If the difference is less than or equal to the preset convergence threshold, the latest subgroup classification result is determined as the optimized final classification result, and the iteration is terminated.
[0058] Preferably, calculating the difference between the new subgroup classification result and the previous round of subgroup classification results includes:
[0059] Subtype tag sequences for all patients were extracted from both the new subgroup classification results and the previous round of subgroup classification results.
[0060] Compare the number of patients whose subtype labels changed under the same patient identifier in two subtype label sequences;
[0061] The percentage obtained by dividing the number of patients whose condition changed by the total number of patients is defined as the degree of difference.
[0062] The convergence threshold is a small value between zero and one, pre-set according to the classification stability requirements.
[0063] Compared with the prior art, the beneficial effects of the present invention are:
[0064] By mapping a structured feature set to a high-dimensional feature space and calculating the density distribution of data points, core regions are identified based on density. This method avoids the reliance of conventional clustering algorithms on the random selection of initial centers. Core regions identified based on density distribution more robustly represent the potential centers of the data distribution, reducing interference from noise points. The remaining data points are then classified according to the nearest neighbor propagation principle. This process allows category information to dynamically propagate and converge through proximity relationships between data points, replacing traditional static distance assignment rules. This combined approach enables the clustering process to adapt to the complex structure of data in high-dimensional space, resulting in patient segmentation schemes with stronger internal consistency, clearer boundaries, and better segmentation capabilities for highly heterogeneous patient groups.
[0065] Distinguishing feature patterns are extracted from each generated patient category and fed into a pre-trained subtype decision model, directly outputting the corresponding clinical subtype label. This step leverages the decision boundaries and mapping relationships learned by the pre-trained model from existing clinical knowledge. The pre-trained model transforms the semantically unsound mathematical groupings obtained from unsupervised clustering into clinical subtypes with clear medical connotations. The clustering results are automatically relabeled based on the model's output labels, replacing the traditional process that relies entirely on human experience for result interpretation and naming. This ensures that the final classification results not only possess an objective grouping structure driven by data but also have immediate clinical interpretability and practicality, directly linking to different prognostic risks or treatment strategy selections. Attached Figure Description
[0066] Figure 1 This is a schematic diagram illustrating the working principle of the cluster analysis-based subgroup classification method for chronic heart failure patients described in this invention.
[0067] Figure 2 A flowchart for feature fusion and structured processing of heterogeneous data sources;
[0068] Figure 3 This is a flowchart of core region identification and connected region generation based on dynamic thresholds;
[0069] Figure 4 Stacked bar chart showing the distribution of clinical subtypes of chronic heart failure;
[0070] Figure 5 Line graph showing the changes in variability during the iterative optimization process of clinical subgroups of chronic heart failure. Detailed Implementation
[0071] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0072] Please see Figure 1 This invention provides a method for subgroup classification of chronic heart failure patients based on clustering analysis. The method includes: acquiring an initial dataset of chronic heart failure patients composed of multiple heterogeneous data sources; performing feature engineering operations on the initial dataset to generate a structured feature set; mapping the structured feature set to a high-dimensional feature space and calculating the density distribution of each data point in the high-dimensional feature space; identifying multiple core regions in the high-dimensional feature space based on this density distribution result; assigning initial category identifiers to these core regions and determining the category affiliation of the remaining data points in the high-dimensional feature space based on the nearest neighbor propagation principle; integrating the category affiliation of all data points to generate a patient clustering scheme; extracting discriminative feature patterns for each category from the structured feature set according to this patient clustering scheme; inputting the discriminative feature patterns into a pre-trained subtype decision model, which outputs a clinical subtype label corresponding to each category; relabeling the patient clustering scheme based on the clinical subtype label to form the final subgroup classification result of chronic heart failure patients.
[0073] In one embodiment of the present invention, see [reference] Figure 2Feature engineering operations are performed on the initial dataset of chronic heart failure patients to generate a structured feature set. This process includes data fusion of the initial datasets from heterogeneous data sources to create a temporary data warehouse with a unified patient identifier. The time-series data in the temporary data warehouse is segmented using a sliding window, and statistics are calculated within each time window, transforming the time-series data into a window feature sequence. Simultaneously, the non-time-series data in the temporary data warehouse is encoded and normalized to generate static feature vectors. The window feature sequences from the same unified patient identifier are horizontally concatenated with the static feature vectors to form a multidimensional feature vector for that unified patient. The multidimensional feature vectors of all patients are collected to form the structured feature set. The structured feature set is mapped to a high-dimensional feature space, and the density distribution of each data point in the high-dimensional feature space is calculated. This process includes processing the structured feature set using a nonlinear transformation method, projecting each multidimensional feature vector to a higher-dimensional space to obtain a high-dimensional feature vector. In the high-dimensional feature space, a local neighborhood is defined centered on the point represented by each high-dimensional feature vector. Calculate the number of other high-dimensional feature vectors that fall within the local neighborhood of each high-dimensional feature vector, and record this number as the local density value of that high-dimensional feature vector. Traverse all high-dimensional feature vectors to obtain the density distribution of the high-dimensional feature space composed of all local density values.
[0074] In practice, the implementation involves performing feature engineering operations on the initial dataset of chronic heart failure patients to generate a structured feature set. This involves the transformation process from multi-source heterogeneous data to normalized feature vectors. The initial dataset of chronic heart failure patients may contain structured diagnostic records from electronic medical record systems, time-series test data from laboratory information systems, unstructured report texts from medical imaging systems, and continuous physiological signals from wearable devices. The data fusion operation uses the patient's unique identifier as the primary key to associate and merge records of the same patient from different data sources, creating a temporary data warehouse under a unified patient identifier. Each record in the temporary data warehouse is associated with a unified patient identifier and multiple fields from different source data.
[0075] In some embodiments, time-series data in the temporary data warehouse is segmented using a sliding window, where the sliding window has a preset window length and sliding step. Within each time window, statistics of the time-series data covered by the window are calculated, including mean, standard deviation, maximum, minimum, and slope, transforming the original time-series data into a window feature sequence composed of a series of window statistics. Simultaneously, non-time-series data in the temporary data warehouse is encoded and normalized. Categorical variables are converted into numerical vectors using one-hot encoding, and continuous variables are scaled using Z-score normalization to generate static feature vectors. Window feature sequences from the same unified patient identifier are horizontally concatenated with the static feature vectors, i.e., connected along the feature dimension, to form a multi-dimensional feature vector corresponding to this unified patient identifier. Collecting all multi-dimensional feature vectors corresponding to unified patient identifiers forms the structured feature set.
[0076] In practical implementation, the structured feature set is mapped to a high-dimensional feature space, and the density distribution of each data point in the high-dimensional feature space is calculated, involving spatial transformation and local density estimation. A nonlinear transformation method is used to process the structured feature set. This nonlinear transformation method can be based on kernel functions, projecting each multidimensional feature vector onto a higher-dimensional reproducing kernel Hilbert space to obtain the corresponding high-dimensional feature vector. In the high-dimensional feature space, a local neighborhood is defined centered on the point represented by each high-dimensional feature vector. This local neighborhood is defined by a preset neighborhood radius parameter ε.
[0077] It can be understood that the number of other high-dimensional feature vectors falling within the local neighborhood of each high-dimensional feature vector is calculated; this number is defined as the local density value of the high-dimensional feature vector. By traversing all high-dimensional feature vectors, the density distribution of the high-dimensional feature space composed of all local density values is obtained. In some embodiments, the calculation of local density values can be smoothly expressed using a kernel density estimation function, such as a Gaussian kernel function. Specifically, the calculation can be expressed as:
[0078]
[0079] in: Indicates the first Local density values of a high-dimensional eigenvector. The total number of high-dimensional feature vectors. and Representing the first The and the first A high-dimensional feature vector, Represents the Euclidean distance between vectors. It is the bandwidth parameter of the Gaussian kernel, used to control the smoothness of density estimation.
[0080] In one embodiment of the present invention, see [reference] Figure 3 Based on the density distribution results, multiple core regions are identified in the high-dimensional feature space. This process includes setting a dynamic threshold for local density values, which is automatically calculated based on the statistical distribution of all local density values. High-dimensional feature vectors with local density values exceeding the dynamic threshold are selected from the density distribution and marked as seed points. Each seed point is used as a growth starting point and connected to other seed points in its local neighborhood whose density values exceed the dynamic threshold, forming a connected region. Each connected region is defined as a core region, and a unique region identifier is generated for each core region. The remaining data points in the high-dimensional feature space are then classified according to the nearest neighbor propagation principle. This process includes identifying remaining high-dimensional feature vectors that have not been marked as seed points from the high-dimensional feature space. For each remaining high-dimensional feature vector, its distance to representative points of all core regions is calculated; these representative points are the seed points with the highest local density values within each core region. The minimum distance is selected from all distances, and the region identifier of the core region corresponding to the minimum distance is assigned to the current remaining high-dimensional feature vector. After assigning identifiers to all remaining high-dimensional feature vectors, all high-dimensional feature vectors with the same region identifier are classified into the same category, thus completing the determination of the category affiliation.
[0081] In practical implementation, the operation of identifying multiple core regions in a high-dimensional feature space based on density distribution results is built upon an existing set of local density values, which constitute the density distribution of the high-dimensional feature space. A dynamic threshold for the local density values is set, which is automatically calculated based on the statistical distribution of all local density values. In some embodiments, the dynamic threshold θ can be determined by calculating a percentile of all local density values, for example, the median of the local density values plus an offset related to the standard deviation. The calculation formula can be expressed as:
[0082]
[0083] in: Represents a dynamic threshold. Represents all local density values the median of This represents the standard deviation of all local density values. It is a non-negative scaling factor. It systematically filters out local density values exceeding a dynamic threshold in the density distribution. The high-dimensional feature vectors are obtained and marked as seed points. Each seed point is used as a growth starting point, and its density value exceeds a dynamic threshold within its local neighborhood. Connect other seed points to form a connected region. The specific connection determination can be based on whether the spatial distance between seed points is less than the preset connection radius.
[0084] It can be understood that each connected region formed by seed points is defined as a core region, and a unique region identifier is generated for each core region, such as a consecutive integer number starting from 1. In some embodiments, the connection process between seed points can be regarded as a graph construction process. Each seed point is a node. If two seed points satisfy the neighborhood connection condition, an edge is established between the two nodes. All interconnected node components in the graph correspond to the identified core regions. In a specific implementation, the category membership relationship of the remaining data points in the high-dimensional feature space is determined based on the nearest neighbor propagation principle. The remaining data points refer to the part of the high-dimensional feature vector that has not been marked as a seed point. The remaining high-dimensional feature vectors that have not been marked as seed points are identified from the high-dimensional feature space. For each remaining high-dimensional feature vector, its distance to the representative points of all core regions is calculated. The representative points of the core regions are defined as the seed points with the highest local density values in each core region. The distance can be calculated using Euclidean distance metric.
[0085] For a given high-dimensional feature vector, the minimum distance to representative points in different core regions is selected from all calculated distances, and the region identifier of the core region corresponding to this minimum value is assigned to the current high-dimensional feature vector. This step means that each remaining data point is classified into the category of the nearest representative point in the core region. After assigning identifiers to all remaining high-dimensional feature vectors, all high-dimensional feature vectors with the same region identifier, including the initial seed point and subsequently assigned remaining points, are classified into the same category. This completes the determination of the category membership of all data points in the high-dimensional feature space. Optionally, the distance calculation can also consider the influence of local density, using a density-based distance metric. During nearest neighbor propagation, if the distances of a remaining data point to multiple representative points in the core regions are very close, a fuzzy membership degree can be introduced for recording, but ultimately a deterministic region identifier will still be assigned to generate a hard clustering partition. Through the above two steps, data points in the high-dimensional feature space are effectively divided into multiple categories with different region identifiers based on density peaks and nearest neighbor relationships.
[0086] In one embodiment of the present invention, a discriminative feature pattern for each category is extracted from a structured feature set. This process includes separating all multi-dimensional feature vectors belonging to the same category from the structured feature set according to the category affiliation, forming a category feature subset. For each feature dimension within the category feature subset, its distribution statistics within the category and its global distribution statistics are calculated. The intra-category distribution statistics and global distribution statistics of each feature dimension are compared to calculate a feature discrimination score. Within each category, all features are ranked according to their feature discrimination scores, and a predetermined number of top-ranked features and their statistics are selected and combined to form the discriminative feature pattern corresponding to that category.
[0087] The process involves inputting discriminative feature patterns into a pre-trained subtype decision model and outputting clinical subtype labels corresponding to each category. This includes providing the pre-trained subtype decision model, which is a decision tree model trained based on historical expert-annotated chronic heart failure patient subtype data. The discriminative feature patterns corresponding to each category are converted into an input vector format acceptable to the decision tree model. These input vectors are then sequentially input into the decision tree model, which, starting from the root node, traverses downwards along different branches based on comparisons of specific feature values in the input vectors with preset splitting thresholds. Finally, the model reaches the leaf nodes, where the predefined labels stored are the output clinical subtype labels; each category is assigned a unique clinical subtype label.
[0088] In practice, discriminative feature patterns for each category are extracted from the structured feature set. The input consists of a patient clustering scheme with completed category affiliation determination and the original structured feature set. Based on category affiliation, all multidimensional feature vectors belonging to the same region identifier are separated from the structured feature set. These multidimensional feature vectors collectively constitute a category feature subset corresponding to that category. For each feature dimension within the category feature subset, its distribution statistics are calculated. These distribution statistics include the feature mean, feature variance, feature median, and quantiles of the feature value. Simultaneously, the distribution statistics of the same feature dimension across the entire structured feature set, i.e., the global data, are also calculated.
[0089] By comparing the within-class distribution statistics and global distribution statistics of each feature dimension, a quantified feature discrimination score is calculated. This feature discrimination score measures the ability of the feature to distinguish between the current category and the overall patient population. In some embodiments, the feature discrimination score can be obtained by calculating the standardized difference between the within-class feature mean and the global feature mean, as specifically expressed as:
[0090]
[0091] in: Representation of features Feature discrimination score, and Representing features respectively Mean and standard deviation within the current subset of category features and Representing features respectively The global mean and global standard deviation across the entire structured feature set. This score can be understood as considering both the feature's offset from the global center position and its degree of dispersion within each category. Within each category, the calculated feature discrimination score... All features are sorted in descending order, and a predetermined number of K features with the highest ranking and their statistics within the category are selected and combined to form the discriminative feature pattern corresponding to the category.
[0092] In practice, the discriminative feature patterns are input into a pre-trained subtype decision model, which outputs clinical subtype labels. The pre-trained subtype decision model is a decision tree model trained based on historical expert-annotated subtype data of chronic heart failure patients. The discriminative feature patterns corresponding to each category are converted into an input vector format acceptable to the decision tree model. The input vector is an ordered numerical vector whose element order strictly matches the feature order used during the training of the decision tree model. The values are derived from the features selected in the discriminative feature patterns and their statistics.
[0093] The input vector is sequentially fed into the decision tree model. Starting from the root node, the decision tree model traverses downwards to child nodes along branches that meet the conditions, based on a comparison of the values of specific features in the input vector with a preset split threshold. In some embodiments, each internal node of the decision tree model stores a feature index and a split threshold, and the traversal process continues until a leaf node of the decision tree model is reached. The predefined label stored in the finally reached leaf node is the clinical subtype label output by the decision tree model, thus assigning a unique clinical subtype label to each input category. Optionally, the decision tree model can be a single decision tree component in an ensemble tree model such as a gradient boosting decision tree or a random forest. Optionally, if the discriminative feature pattern lacks a feature required for a certain split node of the decision tree model, the global mean or median of that feature can be used to fill in the gaps to ensure that the traversal process can continue. It can be understood that the deterministic rule mapping of the decision tree model associates data-driven clustering categories with clinically interpretable subtype labels.
[0094] In one embodiment of the present invention, the patient clustering scheme is re-labeled based on clinical subtype labels to form the final classification result of chronic heart failure patient subgroups. This process includes establishing a mapping table to associate the category numbers defined by region identifiers in the patient clustering scheme with the clinical subtype labels output by the decision tree model. According to the mapping table, all patient records belonging to the same category in the patient clustering scheme are uniformly updated with their corresponding clinical subtype labels. The updated classification results are then subjected to consistency verification to ensure that each patient has one and only one valid clinical subtype label. The classification results that pass the consistency verification are then stored in a structured format; this structured storage result is the classification result of the chronic heart failure patient subgroups.
[0095] In practice, the patient clustering scheme is re-labeled based on clinical subtype labels to form the final classification results of chronic heart failure patient subgroups. The inputs at this stage include the patient clustering scheme and the clinical subtype labels output by the pre-trained subtype decision model for each category. The patient clustering scheme clarifies the membership relationship between each patient record and the category number defined by the region identifier. A mapping table is established to associate the category number defined by the region identifier in the patient clustering scheme with the clinical subtype labels output by the decision tree model. The mapping table serves as the core transformation dictionary, ensuring the accurate translation from numerical clustering results to medically interpretable labels. According to the mapping table, the system traverses all patient records belonging to the same category in the patient clustering scheme and uniformly updates the category identifiers of these patient records to the corresponding clinical subtype labels.
[0096] In some embodiments, the mapping table is constructed directly from the inference output of the decision tree model on the discriminative feature pattern of each category. The decision tree model assigns the label "heart failure with preserved ejection fraction" to category number 1, the label "heart failure with intermediate ejection fraction" to category number 2, and the label "heart failure with reduced ejection fraction" to category number 3. See Table 1 for a specific mapping relationship.
[0097] Table 1: Mapping Table of Region Identifiers and Clinical Subtype Labels
[0098]
[0099] In some embodiments, the operation of updating the category identifier is implemented through a database update statement or a batch data transformation script to ensure that the new label field of all patient records is written atomically. The updated classification results are then checked for consistency. The consistency check ensures that each patient has one and only one valid clinical subtype label. The check process scans all patient records to check whether the clinical subtype label field has null values or values that are not in the predefined set of valid labels. At the same time, it checks whether there are logical errors such as multiple records corresponding to the same patient identifier with inconsistent labels.
[0100] It is understandable that consistency verification is a necessary guarantee for producing reliable classification results. Any verification failure will trigger an exception handling process, such as writing the error record to the audit log and interrupting the stored process for manual review. The classification results that pass the consistency verification will be stored in a structured manner. Structured storage means persisting the data to a database table or a data file in a specific format according to a fixed data pattern. The stored data pattern usually includes fields such as patient identifier, original feature vector hash, initial cluster category number, final clinical subtype label, and processing timestamp.
[0101] Optionally, consistency checks can be extended to include reasonableness checks on label distribution. For example, calculating the percentage of patients under each clinical subtype label and comparing it with the approximate distribution range in historical epidemiological data, issuing warnings if significant deviations are found. Optionally, structured storage can adopt a columnar storage format to optimize subsequent query and analysis performance, or simultaneously generate a summary report for clinicians. It can be understood that the structured storage result represents the final subgroup classification result for chronic heart failure patients. This result constitutes a stable, queryable, and clinically meaningful data asset that can be directly used for subsequent personalized treatment recommendations or prognostic analysis studies.
[0102] See Figure 4 This is a stacked bar chart showing the distribution of clinical subtypes of chronic heart failure, illustrating the differences in the distribution of the three chronic heart failure subtypes related to ejection fraction. In this classification, the proportion of "preservation type" is slightly higher than historical data, while the proportion of "reduced type" is slightly lower than historical data. This is a clinical data statistical chart, commonly used in medical research to "compare the subtype distribution of the current patient population with that of a historical population," helping to verify the rationality of the classification results. By comparing with historical epidemiological data, it is determined whether the current heart failure patient subtype distribution conforms to the general characteristics of the clinical population, providing data support for the reliability of the classification method. Clarifying the subtype structure of the current population can guide sample allocation in subsequent studies such as personalized treatment plans and prognostic analysis.
[0103] In one embodiment of the present invention, after forming the final classification result of the chronic heart failure patient subgroup, an iterative optimization step of the classification result is further included. This step uses the chronic heart failure patient subgroup classification result to back-select the most discriminative feature subset from the structured feature set. The selected feature subset replaces the original structured feature set, and the high-dimensional feature space mapping and all subsequent steps are re-executed to generate a new subgroup classification result. The difference between the new subgroup classification result and the previous subgroup classification result is calculated. If the difference is greater than a preset convergence threshold, the new subgroup classification result is used as input, and the steps in this embodiment are repeated. If the difference is less than or equal to the preset convergence threshold, the latest subgroup classification result is determined as the optimized final classification result, and the iteration is terminated. The difference between the new subgroup classification result and the previous subgroup classification result is calculated. This process includes extracting the subtype label sequence of all patients from the new subgroup classification result and the previous subgroup classification result, respectively. The number of patients whose subtype label changes under the same patient identifier is compared between the two subtype label sequences. The proportion obtained by dividing the number of patients whose condition changed by the total number of patients is defined as the degree of difference. The convergence threshold is a small value between zero and one, pre-set according to classification stability requirements.
[0104] In practice, after the final classification results of chronic heart failure patient subgroups are formed, an iterative optimization step is included. This iterative optimization step aims to improve the stability and cohesion of the classification through feature selection and model rerunning. Using the chronic heart failure patient subgroup classification results, the most discriminative feature subset is back-selected from the structured feature set. The back-selection process is based on the discriminative power of features on the final clinical subtype labels. In some embodiments, for each clinical subtype label, the mean of the multidimensional feature vectors of all patients belonging to that label in each dimension is calculated to form the feature prototype vector of that subtype. Then, the pairwise distances between the feature prototype vectors corresponding to all different subtype labels are calculated. For each feature dimension, the distance differences between all subtype label pairs are summed, and this sum is defined as the global discriminative power score of the feature. The top M features with the highest global discriminative power scores are selected to form the most discriminative feature subset. The selected feature subset replaces the original structured feature set, and the high-dimensional feature space mapping and all subsequent steps are re-executed to generate a new subgroup classification result. The new subgroup classification result includes a new round of clinical subtype label allocation schemes.
[0105] The dissimilarity between the new subgroup classification results and the previous subgroup classification results is calculated, measuring the level of consistency between the two classification results. The specific calculation of the dissimilarity involves extracting subtype label sequences for all patients from both the new and previous subgroup classification results, ensuring strict consistency in the order of patient identifiers in both subtype label sequences. The number of patients whose subtype labels changed under the same patient identifier is compared between the two subtype label sequences. This number is divided by the total number of patients, and the resulting ratio is defined as the dissimilarity. Its mathematical expression can be described as follows:
[0106]
[0107] in: Indicates the first The difference is calculated in the next iteration. This indicates the total number of patients. Indicates the patient In the Clinical subtype labels obtained after the next iteration Indicates the patient In the Clinical subtype labels obtained after the next iteration This is an indicator function; it takes a value of 1 if the condition within the parentheses is true, and 0 otherwise. (Regarding the degree of difference...) If the difference exceeds the preset convergence threshold, the new subgroup classification result is used as input, and the feature selection and re-running process in the iterative optimization step is repeated. If the result is less than or equal to the preset convergence threshold, the latest subgroup classification result is determined as the optimized final classification result, and the iteration is terminated.
[0108] It is understood that the convergence threshold is a small value between zero and one, pre-set according to the classification stability requirements, such as 0.05 or 0.02. The smaller the convergence threshold, the more stable the classification results are required in continuous iterations. In some embodiments, the iterative optimization step sets a maximum number of iterations to prevent infinite loops. When the maximum number of iterations is reached, the iteration terminates and the latest result is output even if the convergence threshold is not met. Optionally, in addition to considering the proportion of patients with changed labels, the difference calculation can also introduce more complex measures that consider changes in subtype size, such as normalized mutual information. It is understood that the iterative optimization step, through a feedback mechanism, brings the feature set on which the classification depends and the generated classification results to a stable state, thereby enhancing the robustness and reproducibility of the chronic heart failure patient subgroup classification method when applied to data with inherent variability.
[0109] See Figure 5This is a line graph showing the change in variance during the iterative optimization process of a clinical subgroup of chronic heart failure. The variance decreased rapidly from an initial value of approximately 0.4, approaching the convergence threshold at the 9th iteration, and then stabilized after the 10th iteration. The variance falling below the convergence threshold after the 9th iteration indicates that the classification results have reached a stable state. This process validates the effectiveness of the iterative process, demonstrating that the classification model tends to stabilize after multiple iterations; variance convergence ensures the consistency and accuracy of the final classification results; and the iteration termination point (the 9th iteration) is clearly defined to avoid invalid computations. The fact that the variance ultimately falls below the convergence threshold indicates that the classification results after multiple iterations fluctuate minimally and possess the reliability required for clinical application.
[0110] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0111] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for subgroup classification of chronic heart failure patients based on cluster analysis, characterized in that, Perform the following sequence of operations: Obtain an initial dataset of chronic heart failure patients composed of multiple heterogeneous data sources; Feature engineering operations were performed on the initial dataset of patients with chronic heart failure to generate a set of structured features, including: Data fusion was performed on the initial dataset of chronic heart failure patients from heterogeneous data sources to create a temporary data warehouse under a unified patient identifier; The time series data in the temporary data warehouse is segmented by a sliding window, and statistics are calculated within each time window to transform the time series data into a window feature sequence. Simultaneously, non-time-series data in the temporary data warehouse is encoded and standardized to generate static feature vectors; The window feature sequence from the same unified patient identifier is horizontally concatenated with the static feature vector to form the multidimensional feature vector of the unified patient. The multidimensional feature vectors of all patients are collected to form the structured feature set mentioned above; Mapping the structured feature set to a high-dimensional feature space and calculating the density distribution of each data point in the high-dimensional feature space includes: The structured feature set is processed using a nonlinear transformation method, which projects each multidimensional feature vector to a higher-dimensional space to obtain a high-dimensional feature vector. In a high-dimensional feature space, a local neighborhood is defined with the point represented by each high-dimensional feature vector as the center. Calculate the number of other high-dimensional feature vectors that fall within the local neighborhood of each high-dimensional feature vector, and record the number as the local density value of the high-dimensional feature vector; By traversing all high-dimensional feature vectors, the density distribution of the high-dimensional feature space composed of all local density values is obtained; Based on the density distribution results, several core regions were identified in the high-dimensional feature space, including: A dynamic threshold for local density values is set, which is automatically calculated based on the statistical distribution of all local density values. High-dimensional feature vectors whose local density values exceed the dynamic threshold are selected from the density distribution, and these high-dimensional feature vectors are marked as seed points. Each seed point is used as the starting point for growth, and it is connected to other seed points in the local neighborhood whose density value exceeds the dynamic threshold to form a connected region; Each connected region is defined as a core region, and a unique region identifier is generated for each core region; Initial category identifiers are assigned to the core region, and the category membership of the remaining data points in the high-dimensional feature space is determined based on the nearest neighbor propagation principle, including: Identify the remaining high-dimensional feature vectors that were not labeled as seed points in the high-dimensional feature space; For each remaining high-dimensional feature vector, calculate its distance to all representative points of the core regions, where the representative points are seed points with the highest local density values within each core region. Select the minimum value from all distances, and assign the region identifier of the core region corresponding to the minimum value to the current remaining high-dimensional feature vector; After assigning identifiers to all remaining high-dimensional feature vectors, all high-dimensional feature vectors with the same region identifier are classified into the same category, thus completing the determination of the category affiliation relationship. Integrate the category affiliation relationships of all data points to generate a patient clustering scheme; Based on the patient clustering scheme, discriminative feature patterns for each category are extracted from the structured feature set, including: Based on the category affiliation, all multidimensional feature vectors belonging to the same category are separated from the structured feature set to form a category feature subset; For each feature dimension, calculate its distribution statistics within the category and its global distribution statistics for the subset of category features. By comparing the in-class distribution statistics of each feature dimension with the global distribution statistics, a feature discrimination score is calculated. Within each category, all features are sorted according to their feature discrimination scores, and a predetermined number of features and their statistics are selected from the top-ranked features and combined to form the discriminative feature pattern corresponding to the category. The discriminative feature patterns are input into a pre-trained subtype decision model, which outputs clinical subtype labels corresponding to each category, including: Provide the pre-trained subtype decision model, which is a decision tree model trained based on historical expert-annotated subtype data of chronic heart failure patients; The discriminative feature patterns corresponding to each category are transformed into an input vector format acceptable to the decision tree model; The input vectors are fed into the decision tree model in sequence. Starting from the root node, the decision tree model traverses downwards along different branches based on the comparison between the values of specific features in the input vectors and the preset splitting thresholds. Finally, the decision tree model reaches the leaf node, where the predefined labels stored are the output clinical subtype labels. Each category is assigned a unique clinical subtype label. Finally, the patient clustering scheme was relabeled based on clinical subtype labels to form the final classification results of chronic heart failure patient subgroups.
2. The method for subgroup classification of chronic heart failure patients based on cluster analysis according to claim 1, characterized in that, The patient clustering scheme based on clinical subtype labels is re-labeled to form the final subgroup classification results of chronic heart failure patients, including: Establish a mapping table to associate the category numbers defined by the region identifier in the patient clustering scheme with the clinical subtype labels output by the decision tree model; Based on the mapping table, all patient records belonging to the same category in the patient clustering scheme are uniformly updated with their category identifiers to the corresponding clinical subtype labels; Perform consistency checks on the updated classification results to ensure that each patient has one and only one valid clinical subtype label; The classification results that pass the consistency check will be stored in a structured format, and the structured storage results are the classification results of the chronic heart failure patient subgroup.
3. The method for classifying subgroups of chronic heart failure patients based on cluster analysis according to claim 1, characterized in that, After the final classification of chronic heart failure patient subgroups is formed, an iterative optimization step is also included in the classification results: Using the classification results of the chronic heart failure patient subgroups, the most discriminative feature subset is selected from the structured feature set. The original structured feature set is replaced by the selected feature subset, and the high-dimensional feature space mapping and all subsequent steps are re-executed to generate new subgroup classification results. Calculate the degree of difference between the new subgroup classification results and the previous round of subgroup classification results; If the difference is greater than the preset convergence threshold, the new subgroup classification result is used as input, and the step of reverse screening from the structured feature set to select the most discriminative feature subset is re-executed. If the difference is less than or equal to the preset convergence threshold, the latest subgroup classification result is determined as the optimized final classification result, and the iteration is terminated.
4. The method for subgroup classification of chronic heart failure patients based on cluster analysis according to claim 3, characterized in that, The calculation of the difference between the new subgroup classification result and the previous round of subgroup classification results includes: Subtype tag sequences for all patients were extracted from both the new subgroup classification results and the previous round of subgroup classification results. Compare the number of patients whose subtype labels changed under the same patient identifier in two subtype label sequences; The percentage obtained by dividing the number of patients whose condition changed by the total number of patients is defined as the degree of difference. The convergence threshold is a small value between zero and one, pre-set according to the classification stability requirements.