Female perimenopausal anomaly detection method and system, and electronic device and medium
Through a machine learning-based method, the decision tree classifier is used to preprocess and feature extraction of perimenopause menstrual data in women, which solves the problems of inaccuracy and efficiency of detection in the prior art, and achieves more efficient perimenopause abnormal detection.
Patent Information
- Application Number
- PCT/CN2024/113637
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-19
- Filing Date
- 2024-08-21
- Publication Date
- 2025-03-27
AI Technical Summary
The prior art has problems such as insufficient prediction content, limited sample size, lack of long-term tracking data, difficulty in identifying complex nonlinear relationships, poor adaptability and low processing efficiency in women's perimenopause abnormality detection.
Using a machine learning-based approach, decision tree classifiers are trained to detect abnormalities in women's perimenopause by taking menstrual data and preprocessing them. The method includes obtaining menstrual data, performing preprocessing and feature extraction, training a decision tree classifier, and using the detection results for abnormal detection.
It improves the accuracy and efficiency of perimenopause abnormality detection in women, can more accurately predict whether perimenopause abnormality, and reduces the labor and time cost during the detection process.
Smart Images

Figure CN2024113637_27032025_PF_FP_ABST
Abstract
Description
A method, system, electronic device and medium for detecting abnormalities in female perimenopause
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application number 2023112078186 filed with the China Patent Office on September 19, 2023, entitled “A method, system, electronic device and medium for detecting perimenopausal abnormalities in women,” the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present disclosure relates to the field of machine learning, and in particular to a method, system, electronic device, and medium for detecting female perimenopausal abnormalities. Background Art
[0004] Existing technical solutions are based on data collection and statistical analysis to identify risk factors for endometrial lesions or metabolic syndrome in perimenopausal patients, providing doctors with information to assist in decision-making. The following defects exist: (1) Prediction content: Existing studies mostly study the risk factors that cause some diseases in perimenopausal patients, and there is no technical method to directly predict whether the patient's perimenopause is abnormal. (2) Limited sample size: The sample size of existing studies is small, and the representativeness and reliability of the results may be affected. (3) Lack of long-term follow-up data: Existing studies may only be cross-sectional studies and do not provide long-term follow-up data. Since the physiological state of perimenopausal women may change over a period of time, long-term follow-up data can better reveal the trend and dynamics of changes. (4) Linear relationship identification: The physiological changes of perimenopausal women usually have complex nonlinear relationships, and traditional methods may be limited in dealing with these nonlinear relationships. (5) Adaptability: The physiological state of perimenopausal women may change over time, and traditional methods usually require manual updates of rules and indicators to adapt to new data and situational changes. (6) Processing efficiency: Detecting abnormalities during perimenopause in women requires comparing multiple indicators and parameters, and traditional methods may require a lot of manpower and time to process and analyze large data sets. Therefore, there is an urgent need for a machine learning-based method for detecting abnormalities during perimenopause in women to improve detection accuracy and efficiency.
[0005] Summary of the Invention
[0006] The purpose of the present disclosure is to provide a method, system, electronic device and medium for detecting abnormalities in female perimenopause, which can improve the accuracy and efficiency of detecting abnormalities in female perimenopause.
[0007] To achieve the above objectives, the present disclosure provides the following solutions:
[0008] A method for detecting abnormalities in female perimenopause, the method comprising:
[0009] Obtaining menstrual data of the target object to be detected;
[0010] The menstrual data is input into a female perimenopausal abnormality detection model to obtain a detection result; the detection result is abnormal or normal; wherein, the female perimenopausal abnormality detection model is obtained by training a decision tree classifier through a training data set; the training data set includes multiple perimenopausal sample data and corresponding test results; the perimenopausal sample data includes age, diagnosis, number of menstrual records, time of each record, and menstrual data of each record.
[0011] Optionally, the training process of the decision tree classifier specifically includes:
[0012] Preprocessing the perimenopausal sample data to obtain preprocessed sample data;
[0013] Inputting the preprocessed sample data into the decision tree classifier to obtain a trained decision tree classifier;
[0014] Determine whether the trained decision tree classifier meets a preset training stop condition; wherein;
[0015] When the trained decision tree classifier meets a preset stopping training condition, stopping training;
[0016] When the trained decision tree classifier does not meet the preset training stop condition, the process returns to the step of "inputting the preprocessed sample data into the decision tree classifier to obtain the trained decision tree classifier" and continues to execute.
[0017] Optionally, preprocessing the perimenopausal sample data to obtain preprocessed sample data specifically includes:
[0018] Determining the menstrual record interval according to the time of each record;
[0019] Deleting the number of times the menstrual record interval is less than a preset interval from the number of menstrual record times to obtain a final number;
[0020] The sample data whose final number of times is less than the preset number of times is deleted from the perimenopausal sample data to obtain the preprocessed sample data.
[0021] Optionally, the diagnosis status includes not having received medical treatment and having received medical treatment; when the age of the preprocessed sample data is greater than the preset age and the diagnosis status is not having received medical treatment, the detection result of the preprocessed sample data is abnormal; otherwise, the detection result of the preprocessed sample data is normal.
[0022] Optionally, the preset training stop condition is that the depth of the trained decision tree classifier reaches a preset depth value or the number of leaf nodes of the trained decision tree classifier reaches a preset number value.
[0023] Optionally, inputting the preprocessed sample data into the decision tree classifier to obtain a trained decision tree classifier includes:
[0024] Based on a preset number of times, generating an input sample according to the preprocessed sample data, wherein the input sample includes menstrual data with continuous recording time and a menstrual recording number that meets the preset number of times;
[0025] The input sample is input into the decision tree classifier to obtain a trained decision tree classifier.
[0026] Optionally, the detection method further includes:
[0027] The female perimenopausal abnormality detection model is evaluated using evaluation indicators to obtain evaluation results; the evaluation indicators include at least one of the following: accuracy, precision, recall rate, F1 score, average precision and auROC; based on the evaluation results, the female perimenopausal abnormality detection model is updated.
[0028] Optionally, the menstrual data includes hot flashes, sweating, paresthesia, insomnia, irritability, depression, dizziness, fatigue, muscle and joint pain, headache, palpitations, tingling sensation on the skin, dyspareunia and urinary system symptoms.
[0029] Optionally, obtaining menstrual data of the target object to be detected includes:
[0030] In response to the target object to be detected scanning the preset QR code, a menstrual data collection page is displayed; according to the target object to be detected filling in the menstrual data collection page, the menstrual data of the target object to be detected is obtained.
[0031] A female perimenopausal abnormality detection system, applying the above-mentioned female perimenopausal abnormality detection method, the detection system comprises:
[0032] an acquisition module configured to acquire menstrual data of a target object to be detected;
[0033] The detection module is configured to input the menstrual data into a female perimenopausal abnormality detection model to obtain a detection result; the detection result is abnormal or normal; wherein, the female perimenopausal abnormality detection model is obtained by training a decision tree classifier through a training data set; the training data set includes multiple perimenopausal sample data and corresponding detection results; the perimenopausal sample data includes age, diagnosis status, number of menstrual records, time of each record and menstrual data of each record; the diagnosis status includes not seeking medical treatment and having sought medical treatment.
[0034] Optionally, the menstrual data includes hot flashes, sweating, paresthesia, insomnia, irritability, depression, dizziness, fatigue, muscle and joint pain, headache, palpitations, tingling sensation on the skin, dyspareunia and urinary system symptoms.
[0035] An electronic device includes a memory and a processor, wherein the memory is configured to store a computer program, and the processor runs the computer program to enable the electronic device to perform the above-mentioned method for detecting female perimenopausal abnormalities.
[0036] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the above-mentioned method for detecting female perimenopausal abnormalities.
[0037] According to the specific embodiments provided by the present disclosure, the present disclosure has the following technical effects:
[0038] The present disclosure obtains menstrual data of a target object to be detected; the menstrual data includes hot flashes, sweating, paresthesia, insomnia, irritability, depression, dizziness, fatigue, muscle and joint pain, headache, palpitations, tingling sensation on the skin, dyspareunia and urinary system symptoms; and inputs the menstrual data into a female perimenopausal abnormality detection model to obtain a detection result; the detection result is abnormal or normal, thereby improving the accuracy of female perimenopausal abnormality detection. Since a trained decision tree classifier is used for female perimenopausal abnormality detection, the efficiency of female perimenopausal abnormality detection is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0040] FIG1 is a flow chart of a method for detecting abnormalities in female perimenopause provided by the present disclosure;
[0041] FIG2 is a flowchart of age calculation provided by the present disclosure;
[0042] FIG3 is a flowchart of missing value processing provided by the present disclosure;
[0043] FIG4 is a flow chart of recording interval calculation provided by the present disclosure;
[0044] FIG5 is a flow chart of removing null values provided by the present disclosure;
[0045] FIG6 is a flowchart of saving a CSV format file provided by the present disclosure;
[0046] FIG7 is a schematic diagram of feature reorganization provided by the present disclosure;
[0047] FIG8 is a flowchart of a specific training process of a decision tree classifier provided by the present disclosure. DETAILED DESCRIPTION
[0048] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present disclosure.
[0049] The purpose of the present disclosure is to provide a method, system, electronic device and medium for detecting abnormalities in female perimenopause, which can improve the accuracy and efficiency of detecting abnormalities in female perimenopause.
[0050] The present invention uses menstrual diaries as clinical features and accurately predicts perimenopausal abnormalities. By making full use of data resources and using the functions provided by the Pandas library for data preprocessing, data processing efficiency can be improved and the impact of outliers can be reduced. Menstrual diaries are used as clinical features for machine learning tasks. By reorganizing the original feature data to focus on the longitudinal changes of each indicator over time and reducing the feature dimension, the training effect of the machine learning model is improved, and it can accurately predict whether perimenopausal abnormalities are present.
[0051] In order to make the above-mentioned objects, features and advantages of the present disclosure more obvious and easy to understand, the present disclosure is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0052] As shown in FIG1 , the present disclosure provides a method for detecting abnormalities in female perimenopause, the method comprising:
[0053] Step S1: Acquire menstrual data of the target object to be detected.
[0054] Among them, the menstrual data includes hot flashes, sweating, paresthesia, insomnia, irritability, depression, dizziness, fatigue, muscle and bone and joint pain, headache, palpitations, tingling sensation on the skin, dyspareunia and urinary system symptoms.
[0055] Optionally, obtaining menstrual data of the target subject to be detected includes:
[0056] In response to the target object to be detected scanning the preset QR code, a menstrual data collection page is displayed; according to the target object to be detected filling in the menstrual data collection page, the menstrual data of the target object to be detected is obtained.
[0057] In actual application, when a patient visits a doctor, they scan the QR code on their WeChat phone or directly enter the remote follow-up center to find the WeChat service platform. By filling in the relevant information in the remote follow-up center, the doctor's end will synchronize the questionnaire results in real time. The 13 indicators involved in menstrual data are filled out by patients after logging into the WeChat service platform - the remote follow-up center. Patients fill in the form by selecting 0, 1, or 2 according to the severity of their symptoms. The patent involved in this remote follow-up center is a multi-institutional collaborative disease research management system, application number: CN201720519292.9.
[0058] Filling out the menstrual diary: When the patient visits the clinic, a menstrual record booklet will be distributed at the same time. The booklet records the date of onset and end of menstruation, menstrual volume, and menstrual symptoms each month, and is updated on the WeChat service platform for women's perimenopause management.
[0059] Step S2: Input the menstrual data into the female perimenopausal abnormality detection model to obtain the detection results.
[0060] The test result is abnormal or normal; the female perimenopausal abnormality detection model is obtained by training a decision tree classifier through a training data set; the training data set includes multiple perimenopausal sample data and corresponding test results; the perimenopausal sample data includes age, diagnosis, number of menstrual records, time of each record and menstrual data of each record; the diagnosis includes not seeking medical treatment and having received medical treatment.
[0061] Specifically, when the age of the preprocessed sample data is greater than the preset age and the diagnosis is that the patient has not received medical treatment, the detection result of the preprocessed sample data is abnormal; otherwise, the detection result of the preprocessed sample data is normal.
[0062] In practical applications, a patient's three consecutive menstrual diary entries are used to detect perimenopausal abnormalities. During previous training, the training features were a 3×13 matrix, representing the patient's three consecutive menstrual diary entries. This means that these three records, a 3×13 matrix, are required; no personal information is required. After collecting these three records, no preprocessing is required; the 3×13 matrix is simply input into the model. The trained model's input is the three consecutive menstrual diary entries (a 3×13 matrix); the output indicates whether the patient is negative or positive (0 or 1).
[0063] As a specific implementation method, the training process of the decision tree classifier specifically includes:
[0064] Step S101: pre-processing the perimenopausal sample data to obtain pre-processed sample data.
[0065] S101 specifically includes:
[0066] Step S1011: Determine the menstrual record interval based on the time of each record.
[0067] Step S1012: Delete the number of menstrual record times with an interval less than a preset interval from the number of menstrual record times to obtain a final number.
[0068] Step S1013: Delete sample data with a final number of times less than a preset number from the perimenopausal sample data to obtain preprocessed sample data.
[0069] Optionally, the preset interval can be the average menstrual record interval corresponding to multiple perimenopausal sample data, or it can be a preset value, such as 28 days; the value of the preset number of times can be 3, 5, etc., which is not limited here.
[0070] In actual applications, there are two tables as input data. Table 1 includes patient information (name, birthday, hospital, medical card ID), diagnosis, number of menstrual records and the time of each record; Table 2 includes patient information (name, birthday, hospital, medical card ID, mobile phone number, start of follow-up, height, weight, BMI, age of menarche), the time of each record and the specific data of each record. The main difference between Table 1 and Table 2 is that Table 1 contains the time of each record and the number of menstrual records, while Table 2 contains the specific circumstances of each record. The specific information contained in Tables 1 and 2 is explained in this section. In this disclosure, filling in a menstrual diary refers to the data input into Tables 1 and 2.
[0071] Based on patient information and menstrual records, samples are preprocessed and divided into two categories: negative and positive. The data in Tables 1 and 2 are mapped using patient information as labels, so patient information is contained in both tables. Later in the processing, these two tables will be merged into a single table.
[0072] Specifically, patients with more than three menstrual records were selected as research subjects. Patients over 45 years old who had not sought medical treatment or were undiagnosed were considered negative samples, while patients with a diagnosis were considered positive samples. For each patient's record, 13 indicators, including "hot flashes and sweating," "paresthesia," and "insomnia," were selected as features of that record. Each patient's three records, totaling 39 data points, were used as features of a sample, where 0 represents the label for a negative sample and 1 represents the label for a positive sample. Positive samples are those that were detected as abnormal, and negative samples are those that were detected as normal.
[0073] As a specific implementation, as shown in Figures 2 to 6, the preprocessing process includes reading data (using pd.read_excel() to put the data in Table 1 into df1 and read the data in Table 2 into df2), screening samples (df1 = df1[df1["Number of menstrual diary times"]>=3]), calculating age (df1["age"] = df1['birthday'].apply(age), where the age function is as follows), merging (df_positive = df_positive.merge(df2,left_on = 'name', right_on = 'birthday')), and segmenting (positive sample: df_positive = df1.loc[df1["diagnosis"].str.contains("visit|no diagnosis")].
[0074] df_positive = df_positive[df_positive["age"]>=45]. Negative sample: df_positive = df_positive[df_positive["age"]>=45]), processing abnormal data (processing records with a record content of -1 and updating the record count. The missing value processing function is as follows), deleting abnormal records (deleting records with a record interval of less than 20 days and updating the record count. The record interval calculation function is as follows), cleaning null values (removing null values from deleted records. The function for removing null values is as follows), sorting (reordering the values according to the new "menstrual record count" after processing df_yin.sort_values("menstrual diary count", ascending=False, inplace=True)) and modifying the data format (saving the file in CSV format is as follows). Functions provided by the Pandas library are required to perform multiple steps such as reading, manipulating, converting, and outputting data.
[0075] Ultimately, we obtained 577 negative samples and 141 positive samples. This preprocessing method can better utilize data resources, thereby obtaining more accurate results in subsequent data modeling and analysis.
[0076] Optionally, the above-mentioned inputting the preprocessed sample data into the decision tree classifier to obtain a trained decision tree classifier includes: based on a preset number of times, generating an input sample according to the preprocessed sample data, the input sample including menstrual data with continuous recording time and a number of menstrual records meeting a preset number of times; inputting the input sample into the decision tree classifier to obtain a trained decision tree classifier.
[0077] The preset number of times may be 3, but is not limited thereto.
[0078] To further illustrate based on the above example, optionally, the original 39-dimensional features of each sample can be reorganized into a matrix of 3 rows and 13 columns (divide df into three sub-dfs, each sub-df has 13 columns of data) as the input sample to better focus on the longitudinal changes and information of each indicator over time.
[0079] Because the 39 features represent the results of three consecutive patient records, there is a relationship between every 13 of these results. For example, in the figure above, the first column of a 3×13 matrix represents the three recorded results for the indicator "hot flashes and sweating." Therefore, this reconstruction method can help us better understand and analyze the changing trends of each indicator at different time points. It also reduces the feature dimension, which helps improve the training effect of the machine learning model. As shown in Figure 7, in this process, the maximum value of each indicator in the three records is vertically extracted (that is, the maximum value at the corresponding position in each df is extracted) so that these 13-dimensional features can be used for subsequent training. In this way, we can better utilize data resources and obtain more accurate results.
[0080] After preprocessing, the dataset is split into training and testing sets for validation and evaluation during model building and training.
[0081] We use the train_test_split function (from the sklearn.model_selection package in Python, which is described below) to split the dataset into training and test sets. The test_size parameter specifies the test set size, which we set to 0.09 in this example. The random_state parameter ensures consistent results between splits, while the stratify parameter performs stratified sampling of labels, ensuring a consistent label ratio between the training and test sets. Finally, we obtain two data frames, the training and test sets, which we can use to build and train the machine learning model.
[0082] Step S102: inputting the preprocessed sample data into the decision tree classifier to obtain a trained decision tree classifier.
[0083] In actual applications, as shown in Figure 8, after data preprocessing and the division into training and test sets, the training process uses StandardScaler() to standardize features to ensure that all features have the same scale. Next, the feature data for the training and test sets are transformed using the fit_transform() and transform() functions, respectively, to obtain standardized training and test set features. During training, a decision tree model was used as the classifier, trained with default parameters. A decision tree is a supervised learning algorithm based on a tree structure. It analyzes training data to construct a tree-like model to classify new input data. During training, the decision tree model automatically selects the optimal split point to classify different categories based on the given features and labels. In classification tasks, decision trees generally achieve high accuracy and are easy to understand and interpret.
[0084] StandardScaler is a data preprocessing class in the scikit-learn library (sklearn) that is used to standardize feature data. Standardization is a common data preprocessing method that aims to transform feature data into a standard normal distribution with a mean of 0 and a variance of 1. scaler.fit_transform() is a method in the StandardScaler class that calculates the mean and standard deviation of feature data and performs standardization. scaler.transform() is a method in the StandardScaler class that standardizes feature data based on the calculated mean and standard deviation.
[0085] The training process of the decision tree classifier is as follows:
[0086] Split the dataset: First, use the train_test_split() function to split the dataset into training and test sets, with the test set accounting for 9% of the total dataset. A random seed is set to ensure repeatability of the split. Also, use the stratify parameter during the split to perform stratified splits based on the categories in the label column (df['label']) to maintain the same proportions of each category in the training and test sets as in the original dataset.
[0087] Data preprocessing: Create a StandardScaler object (scaler) and fit it to the training set feature data (calculating the mean and standard deviation). Then, use the fitted results to standardize the feature data for the training and test sets. The training set feature data is stored in train_features , and the test set feature data is stored in test_features . This operation helps ensure that the feature data has a similar scale, preventing some features from having an excessive influence on the model.
[0088] Prepare labels: Extract label information from the training set and test set and store them in train_labels and test_labels respectively. The label is positive or negative, which refers to 0 or 1 in the program.
[0089] Model training: Create a decision tree classifier object decision_tree_classifier and instantiate it as an object of the DecisionTreeClassifier class. Then, use the training dataset (the preprocessed feature matrix train_features and the corresponding labels train_labels) to train the decision tree classifier and complete the training process by calling the fit() method.
[0090] Step S103: Determine whether the trained decision tree classifier meets a preset training stop condition; wherein the preset training stop condition is that the depth of the trained decision tree classifier reaches a preset depth value or the number of leaf nodes of the trained decision tree classifier reaches a preset number value.
[0091] Step S104: When the trained decision tree classifier meets the preset stopping training condition, the training is stopped.
[0092] Step S105: When the trained decision tree classifier does not meet the preset training stop condition, return to step S102 to continue execution.
[0093] In practice, a decision tree classifier will continue to grow until one of the following conditions is met:
[0094] Reaching the preset maximum depth (max_depth) or number of leaf nodes (max_leaf_nodes): When the depth or number of leaf nodes of the decision tree reaches the preset maximum value, the splitting stops and the node is marked as a leaf node. This condition can be used to control the complexity of the decision tree and avoid overfitting.
[0095] All samples belong to the same category and no further division is required: If all samples at a node of the decision tree belong to the same category, that is, the node purity is 100%, then stop splitting and mark the node as a leaf node. Because further division will only lead to subsets of the same category, it will not change the prediction result.
[0096] The number of samples on the branch node is less than the preset minimum number of samples (min_samples_split): When the number of samples on a node is less than the preset minimum number of samples, the split is stopped and the node is marked as a leaf node. This condition can prevent excessive splitting on nodes with fewer samples and avoid overfitting.
[0097] In addition, the test method also includes:
[0098] The female perimenopausal abnormality detection model is evaluated using evaluation indicators to obtain evaluation results; the evaluation indicators include at least one of the following: accuracy, precision, recall rate, F1 score, average precision and auROC; based on the evaluation results, the female perimenopausal abnormality detection model is updated.
[0099] After the evaluation indicators are predicted on the test set, the performance of the model needs to be evaluated. After evaluating the model according to the evaluation indicators, the evaluation results can be obtained. If the evaluation results do not meet the preset requirements, it means that the detection performance of the model is poor (for example, the detection accuracy of the model is low, or the detection efficiency of the model is low). At this time, the female perimenopausal abnormality detection model can be updated. Optionally, the update method can include but is not limited to: updating the number of perimenopausal sample data, updating the parameters of the model, updating the method of extracting sample signs, etc., which can be flexibly selected according to the actual application scenario.
[0100] To this end, classification performance indicators, including accuracy, precision, recall, F1-Score, average precision (Aupr), and area under the receiver operating characteristic (ROC) curve (AUROC), can reflect the performance of the model in different aspects and help better understand and optimize the model.
[0101] Specifically, accuracy is the ratio of the number of samples correctly predicted by the classifier to the total number of samples. The formula is accuracy = (number of correctly predicted samples) / (total number of samples). Accuracy assesses the overall classification accuracy of the model.
[0102] Precision: Precision is the ratio of the number of samples predicted as positive by the classifier to the total number of samples predicted as positive. The formula is Precision = (True Positives) / (True Positives + False Positives). Precision assesses the accuracy of the samples predicted as positive.
[0103] Recall: Recall is the ratio of the number of examples a classifier correctly predicts as positive to the total number of examples that are actually positive. The formula is Recall = (True Positives) / (True Positives + False Negatives). Recall assesses the classifier's recall of positive examples.
[0104] F1-score: The F1-score is the harmonic mean of precision and recall, taking into account both the accuracy and recall of a classifier. The formula is F1-score = (2 × precision × recall) / (precision + recall).
[0105] Average Precision (Aupr): The average accuracy is the area under the curve between precision and recall calculated at different thresholds. It measures the overall prediction accuracy of the classifier at different thresholds.
[0106] Area Under ROC Curve (auROC): auROC evaluates the performance of a classifier by plotting the receiver operating characteristic curve (ROC curve) and calculating its area under the curve. The ROC curve compares the true positive rate (TPR) to the false positive rate (FPR).
[0107] The method for detecting abnormalities in female perimenopause provided by the present disclosure has the following advantages:
[0108] 1. Fully utilize data resources: By collecting and integrating patient information such as menstrual records and medical questionnaires through various channels and using functions provided by the Pandas library for data preprocessing, data processing efficiency can be effectively improved and the impact of missing data or outliers can be reduced. Furthermore, sample screening and processing can reduce the impact of noise and outliers, thereby better utilizing data resources.
[0109] 2. The preprocessing method is highly transferable: Reorganizing the original 39 features into a 3-row, 13-column matrix allows for better focus on the temporal changes and information of each indicator, while also reducing feature dimensionality, which helps improve the training effectiveness of machine learning models. Furthermore, the use of decision trees as classifiers offers fast computational speed, ease of understanding and interpretation, and strong transferability across different datasets.
[0110] 3. High Model Accuracy and Stability: We used a variety of common classification performance metrics to comprehensively reflect the model's performance in various aspects, enabling us to better understand and optimize the model. Furthermore, during training, we used StandardScaler to standardize features to ensure that all features have the same scale, thereby improving model stability and accuracy.
[0111] 4. Automation: We use WeChat to scan QR codes and automatically synchronize questionnaire results to automatically collect and process patient information. We also use the functions provided by the Pandas library to preprocess data and divide the training and test sets, reducing the need for manual intervention and improving processing efficiency.
[0112] Optionally, in order to execute the methods corresponding to the above embodiments and achieve corresponding functions and technical effects, a female perimenopausal abnormality detection system is provided below, the detection system comprising:
[0113] The acquisition module is configured to acquire menstrual data of the target object to be detected; the menstrual data includes hot flashes, sweating, paresthesia, insomnia, irritability, depression, dizziness, fatigue, muscle and joint pain, headache, palpitations, skin tingling, dyspareunia and urinary system symptoms.
[0114] The detection module is configured to input the menstrual data into a female perimenopausal abnormality detection model to obtain a detection result; the detection result is abnormal or normal; wherein the female perimenopausal abnormality detection model is obtained by training a decision tree classifier using a training data set; the training data set includes perimenopausal sample data and corresponding detection results; the perimenopausal sample data includes age, diagnosis, number of menstrual records, time of each record, and menstrual data of each record.
[0115] Optionally, the menstrual data includes hot flashes, sweating, paresthesia, insomnia, irritability, depression, dizziness, fatigue, muscle and joint pain, headache, palpitations, tingling sensation on the skin, dyspareunia and urinary system symptoms.
[0116] An embodiment of the present disclosure provides an electronic device, including a memory and a processor, wherein the memory is configured to store a computer program, and the processor runs the computer program to enable the electronic device to perform the above-mentioned method for detecting female perimenopausal abnormalities.
[0117] Optionally, the above-mentioned electronic device may be a server.
[0118] In addition, an embodiment of the present disclosure further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned method for detecting female perimenopausal abnormalities when executed by a processor.
[0119] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0120] This document uses specific examples to illustrate the principles and implementation methods of the present disclosure. The above examples are only intended to help understand the methods and core concepts of the present disclosure. At the same time, those skilled in the art will find that the specific implementation methods and application scopes may vary based on the concepts of the present disclosure. In summary, the contents of this specification should not be construed as limiting the present disclosure. Industrial Applicability
[0121] By adopting the above scheme, the menstrual data of the target object to be detected is obtained; the menstrual data is input into the female perimenopausal abnormality detection model to obtain the detection results, which can improve the accuracy and efficiency of female perimenopausal abnormality detection.
Claims
1. A method for detecting abnormalities in female perimenopause, characterized in that: The detection method comprises: Obtaining menstrual data of the target object to be detected; The menstrual data is input into a female perimenopausal abnormality detection model to obtain a detection result; the detection result is abnormal or normal; wherein the female perimenopausal abnormality detection model is obtained by training a decision tree classifier through a training data set; the training data set includes a plurality of perimenopausal sample data and corresponding detection results; the perimenopausal sample data includes age, diagnosis, number of menstrual records, time of each record, and menstrual data of each record.
2. The method for detecting abnormalities in female perimenopause according to claim 1, characterized in that: The training process of the decision tree classifier specifically includes: Preprocessing the perimenopausal sample data to obtain preprocessed sample data; Inputting the preprocessed sample data into the decision tree classifier to obtain a trained decision tree classifier; Determining whether the trained decision tree classifier meets a preset training stop condition; When the trained decision tree classifier meets the preset stopping training condition, stopping training; When the trained decision tree classifier does not meet the preset stop training condition, return to the step of "inputting the preprocessed sample data into the decision tree classifier to obtain the trained decision tree classifier" and continue execution.
3. The method for detecting abnormalities in female perimenopause according to claim 2, characterized in that: Preprocessing the perimenopausal sample data to obtain preprocessed sample data specifically includes: Determine the menstrual record interval according to the time of each record; Deleting the number of times the menstrual record interval is less than a preset interval from the number of menstrual record times to obtain a final number; The sample data whose final number is less than the preset number is deleted from the perimenopausal sample data to obtain the preprocessed sample data.
4. The method for detecting abnormalities in female perimenopause according to claim 2 or 3, characterized in that: The diagnosis conditions include those who have not received medical treatment and those who have received medical treatment; When the age of the pre-processed sample data is greater than the preset age and the diagnosis is that no medical treatment has been sought, the detection result of the pre-processed sample data is abnormal; Otherwise, the detection result of the preprocessed sample data is normal.
5. According to the method for detecting perimenopausal abnormalities in women according to any one of claims 2 to 4, the preset stopping training condition is that the depth of the trained decision tree classifier reaches a preset depth value or the number of leaf nodes of the trained decision tree classifier reaches a preset number value.
6. The method for detecting female perimenopausal abnormalities according to any one of claims 2 to 5, wherein the step of inputting the preprocessed sample data into the decision tree classifier to obtain a trained decision tree classifier comprises: Based on a preset number of times, generating an input sample according to the preprocessed sample data, wherein the input sample includes menstrual data with continuous recording time and a menstrual recording number that meets the preset number of times; The input sample is input into the decision tree classifier to obtain a trained decision tree classifier.
7. The method for detecting abnormalities in female perimenopause according to any one of claims 1 to 6, characterized in that: The detection method further comprises: Evaluate the female perimenopausal abnormality detection model by using evaluation indicators to obtain evaluation results; the evaluation indicators include at least one of the following: accuracy, precision, recall, F1 score, average precision and area under ROC curve; According to the evaluation results, the female perimenopausal abnormality detection model is updated.
8. The method for detecting abnormalities in the female perimenopause according to any one of claims 1 to 7, wherein the menstrual data includes hot flashes, sweating, paresthesia, insomnia, irritability, depression, dizziness, fatigue, muscle and bone and joint pain, headache, palpitations, tingling sensation on the skin, dyspareunia and urinary system symptoms.
9. The method for detecting female perimenopausal abnormalities according to any one of claims 1 to 8, wherein the step of obtaining menstrual data of the target object to be detected comprises: In response to the target object to be detected scanning the preset QR code, displaying a menstrual data collection page; According to the filling operation of the target object to be detected on the menstrual data collection page, the menstrual data of the target object to be detected is obtained.
10. A female perimenopausal abnormality detection system, characterized in that: The detection system comprises: An acquisition module, configured to acquire menstrual data of a target object to be detected; The detection module is configured to input the menstrual data into a female perimenopausal abnormality detection model to obtain a detection result; the detection result is abnormal or normal; wherein the female perimenopausal abnormality detection model is obtained by training a decision tree classifier through a training data set; the training data set includes a plurality of perimenopausal sample data and corresponding detection results; the perimenopausal sample data includes age, diagnosis, number of menstrual records, time of each record, and menstrual data of each record.
11. The female perimenopausal abnormality detection system according to claim 10, wherein the menstrual data includes hot flashes, sweating, paresthesia, insomnia, irritability, depression, dizziness, fatigue, muscle and bone and joint pain, headache, palpitations, tingling sensation on the skin, dyspareunia and urinary system symptoms.
12. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory is configured to store a computer program, and the processor runs the computer program to enable the electronic device to perform the method for detecting female perimenopausal abnormalities according to any one of claims 1 to 9.
13. A computer-readable storage medium, characterized in that: It stores a computer program, which, when executed by a processor, implements the method for detecting female perimenopausal abnormalities as described in any one of claims 1 to 9.
Citation Information
Patent Citations
System and method for managing menstrual period based on cloud platform
CN104680459A
Method, device and terminal for predicting menstrual cycles of women
CN106980914A
Method for researching pulse condition characteristics of climacteric women
CN110853755A
Menstrual period data processing method and device, electronic equipment and storage medium
CN115424734A
Abnormal medical data detection method, device and equipment
CN116167872A