Data prediction method and apparatus

The method enhances prediction accuracy by clustering feature sets and training separate models on different data groups, improving machine learning's accuracy and specificity through the use of the closest model for prediction.

JP7561477B2Active Publication Date: 2024-10-04WISTRON CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2023027824
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2022-10-03
Filing Date
2023-02-24
Publication Date
2024-10-04
Estimated Expiration
2043-02-24

AI Technical Summary

Technical Problem

Existing machine learning methods struggle to improve prediction accuracy by effectively utilizing clustering techniques to identify similar data groups for more precise predictions.

Method used

A data prediction method involving dimensionality reduction, normalization, and clustering of feature sets to select the most similar machine learning model for prediction, training separate models on different data groups, and using the closest model for prediction.

Benefits of technology

Improves machine learning accuracy, sensitivity, and specificity by identifying the most similar data group for prediction, enhancing the effectiveness of training and prediction processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007561477000004
    Figure 0007561477000004
  • Figure 0007561477000005
    Figure 0007561477000005
  • Figure 0007561477000006
    Figure 0007561477000006
Patent Text Reader

Abstract

To provide a data prediction method and apparatus for searching for a first machine learning model corresponding to a data group most similar to predicting data to predict the predicting data. thereby facilitating improvement in accuracy, sensitivity, and specificity of machine learning.SOLUTION: A data prediction method is provided, comprising determining distances between predicting data and a plurality of data groups, selecting a first machine learning model corresponding to one of the data groups having a shortest distance with the predicting data from a plurality of machine learning models, and predicting the predicting data using the first machine learning model, where the machine learning models are respectively trained using different data groups.SELECTED DRAWING: Figure 9
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a data prediction technology, and in particular to a data prediction method and apparatus for machine learning. [Background technology]

[0002] Machine learning algorithms can make predictions about unknown data by analyzing large amounts of data and inferring patterns in the data. In recent years, machine learning has been widely used in image recognition, natural language processing, outcome prediction, medical diagnosis, error detection, or speech recognition. Summary of the Invention [Problem to be solved by the invention]

[0003] In consideration of this, an embodiment of the present invention provides a data prediction method and apparatus capable of predicting data through clustering to improve prediction accuracy. [Means for solving the problem]

[0004] The data prediction method of the embodiment of the present invention is suitable for machine learning, and the data prediction method includes (but is not limited to) the following operations: A distance between the prediction data and a plurality of data groups is determined; A machine learning model corresponding to a data group having the shortest distance with the prediction data is selected from the plurality of machine learning models; A first machine learning model is used to predict the prediction data; Each of the machine learning models is trained using a different data group.

[0005] A data prediction apparatus according to an embodiment of the present invention includes, but is not limited to, a memory and a processor. The memory is used to store a program code. The processor is coupled to the memory. The processor is configured to load the program code and perform the following operations: A distance between the prediction data and a plurality of data groups is determined. From the plurality of machine learning models, a first machine learning model corresponding to one of the data groups having the shortest distance with the prediction data is selected. The first machine learning model is used to predict the prediction data. Each of the machine learning models is trained using a different data group. Effect of the Invention

[0006] As described above, according to the data prediction method and device of the embodiment of the present invention, a first machine learning model corresponding to a data group most similar to the prediction data is searched for, and the prediction data is predicted. This promotes the improvement of the accuracy, sensitivity, and specificity of machine learning.

[0007] In order to make the above mentioned features and advantages of the present invention comprehensible, embodiments accompanied with drawings are described in detail below. [Brief description of the drawings]

[0008] [Figure 1] FIG. 2 is a component block diagram of a data prediction apparatus according to an embodiment of the present invention. [Diagram 2] 2 is a flowchart of a data prediction method according to an embodiment of the present invention. [Diagram 3] FIG. 2 is a schematic diagram of an analysis result according to one embodiment of the present invention. [Figure 4] FIG. 2 is a distribution diagram of main components according to one embodiment of the present invention. [Diagram 5] FIG. 2 is a clustering schematic diagram of a hierarchical clustering method according to an embodiment of the present invention. [Figure 6] FIG. 2 is a schematic diagram of validation results of training the first group, respectively, according to an embodiment of the present invention; [Figure 7]FIG. 11 is a schematic diagram of validation results of training the second group, respectively, according to an embodiment of the present invention; [Figure 8] 1 is a schematic diagram of validation results of joint training of multiple groups according to an embodiment of the present invention. [Figure 9] 1 is a flowchart of data prediction according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0009] 1 is a component block diagram of a data prediction device 10 according to an embodiment of the present invention. Referring to FIG. 1, the data prediction device 10 includes (but is not limited to) a memory 11 and a processor 12. The data prediction device 10 may be a mobile phone, a tablet computer, a notebook computer, a desktop computer, a voice assistant device, a smart home appliance, a wearable device, an in-vehicle device, or other electronic device.

[0010] The memory 11 may be any type of fixed or movable random access memory (RAM), read only memory (ROM), flash memory, a conventional hard disk drive (HDD), a solid state drive (SSD), or a similar component. In one embodiment, the memory 11 is used to store program code, software modules, configurations, data, or files (e.g., data, models, or functions), which are described in detail in subsequent embodiments.

[0011] The processor 12 is coupled to the memory 11. The processor 12 may be a central processing unit (CPU), a graphic processing unit (GPU), or other programmable general-purpose or special-purpose microprocessor, a digital signal processor (DSP), a programmable controller, a field programmable gate array (FPGA), an application-specific integrated circuit (ASIC), a neural network accelerator, or other similar components, or a combination of these components. In one embodiment, the processor 12 is used to execute all or part of the operations of the data prediction device 10, and can load and execute each program code, software module, file, and data stored in the memory 11. Some operations in the method of the embodiment of the present invention may be performed by different or the same processor 12.

[0012] In one embodiment, the data prediction device 10 further includes a sensor 15. The processor 12 is coupled to the sensor 15. For example, the sensor 15 is connected to the processor 12 via USB, Thunderbolt, Wi-Fi, Bluetooth, or other wired or wireless communication technology. As another example, the data prediction device 10 has a built-in sensor 15. The sensor 15 may be a radar, a microphone, a temperature sensor, a humidity sensor, an image sensor, a motion sensor, or other types of sensors. In one embodiment, the sensor 15 is used for sensing to obtain sensing data. In one embodiment, the sensing data is time-dependent data. That is, it is data recorded in a time series, in continuous time, or at multiple points in time. For example, the sensing data is a sensing result (e.g., an in-phase quadrature signal), an audio signal, or a continuous image of a radar.

[0013] Hereinafter, the method according to the embodiment of the present invention will be described in conjunction with various devices, components and modules in the data prediction device 10. Each process of the method can be adjusted according to the implementation, and is not limited thereto.

[0014] FIG. 2 is a flowchart of a data prediction method according to an embodiment of the present invention. Referring to FIG. 2, the processor 12 performs a dimensionality reduction analysis on a plurality of feature sets to obtain an analysis result (step S201). Specifically, each feature set includes one or more features. The type of the feature may vary according to the type of sensing data of the sensor 15. Taking the IQ signal of a radar as an example, the feature may be the variance between different channels or may be related to the waveform. In another example, the feature may be the zero-crossing rate (ZCR), pitch, or Mel frequency cepstral coefficients (MFCC) in the acoustic feature.

[0015] In one embodiment, the processor 12 can convert the multiple sensing data into a feature set. For example, an IQ signal is converted into a feature related to the variance between different channels or waveforms. In another example, an audio signal is converted into ZCR, pitch, or MFCC.

[0016] For example, Table 1 shows radar IQ sensing data.

[0017] [Table 1]

[0018] The processor 12 can reshape the sensing data in Table 1 into a matrix format. For example, the matrix is ​​a 300x500 matrix, whose elements are I or Q data.

[0019] In another embodiment, the processor 12 may download or receive sensing data of an external sensor or feature set generated by an external computing device via a communications transceiver (not shown).

[0020] The different feature sets may correspond to sensing data of different subjects or different targets. For example, a first feature set is transformed from sensing data of a first subject, and a second feature set is transformed from sensing data of a second subject. Alternatively, the different feature sets may correspond to sensing data of the same subject or target at different times or in different environments. For example, a third feature set corresponds to sensing data of a third subject in a first time period, and a fourth feature set corresponds to sensing data of the third subject in a second time period.

[0021] In one embodiment, the processor 12 can mark one or more feature sets. For example, events such as hypopnea, arousals, apnea, etc. are marked. However, the marked content may still vary depending on the type of feature, and the embodiment of the present invention is not limited thereto.

[0022] Dimension reduction analysis is used to reduce features, i.e. each feature is considered as one dimension and reducing the dimensions also reduces the features. In one embodiment, the dimension reduction analysis is Principal Component Analysis (PCA) or Principal Coordinate Analysis (PCoA). For PCA, an orthogonal transformation is used to linearly transform the observations of a set of potentially correlated variables (features in this embodiment) and thereby project them onto a set of linearly uncorrelated variable values. These uncorrelated variables are called principal components. That is, the main elements and structure can be found from several features. Unlike PCA, PCoA is a projection of a distance matrix (record of the differences / distances between two observations) of observations obtained by different distance algorithms. Moreover, PCoA finds the principal coordinates of the distance matrix.

[0023] The analysis result may be the principal components and their ratios, or the principal coordinates and their ratios. The ratio refers to the principal components or the principal coordinates. For example, FIG. 3 is a schematic diagram of the analysis result according to an embodiment of the present invention. Referring to FIG. 3, it is assumed that the sensing data is sleep data sensed through a continuous wave (CW) radar, and the corresponding marked verification data is data generated by polysomnography (PSG). The comparison subjects are sleep events such as hypopnea, arousal, and apnea. That is, the radar is used to predict sleep events. This embodiment is analyzed using data from 32 subjects. After converting the radar data of the 32 subjects into features, PCA / PCoA processing is performed to obtain the configuration of the principal components shown in FIG. 3. The analysis result includes the principal components from PC1 to PC11 and their ratios. The ratio of the principal component PC1 is the highest.

[0024] In other embodiments, the dimensionality reduction analysis may be linear discriminant analysis (LDA), t-distributed stochastic neighbor embedding (t-SNE), or other dimensionality reduction. The analysis results include the reduced features or dimensions and their ratios.

[0025] 2, the processor 12 may normalize the feature set according to the analysis result to generate a plurality of normalized feature sets (step S220). Specifically, normalization refers to scaling the feature values ​​so that the scaled values ​​fall within a particular interval (such as [0,1] or [0,10]). That is, the value of each feature in the feature set is scaled to fall within a particular interval.

[0026] In one embodiment, the processor 12 selects one or more first principal components from the plurality of principal components, and normalizes the feature set according to the first principal components. For example, the processor 12 sets maximum and minimum values ​​of an interval, and performs normalization for each principal component so that the reference points of each principal component match each other.

[0027] In one embodiment, the first principal component is the principal component with the highest ratio among the principal components. For example, the ratio of principal component PC1 in Fig. 3 is much higher than that of other principal components PC2 to PC11, so principal component PC1 may be selected for subsequent normalization.

[0028] In another embodiment, the first principal component is the principal component with the highest ratio or the principal component with the second highest ratio among the principal components. The difference between the principal component with the highest ratio and the principal component with the second highest ratio among all components is less than a threshold (for example, the threshold can be 3%, 5%, or 10%). For example, if the difference between the principal component with the highest ratio and the principal component with the second highest ratio is within 5%, the principal component with the second highest ratio will also be considered and selected together. If there are other principal components with ratio rankings whose difference with the principal component with the highest ratio is less than a threshold, such principal components will also be considered in the subsequent normalization.

[0029] In one embodiment, processor 12 may rank the feature set by percentile transformation, i.e., transforming the feature values ​​into rankings. For example, Table 2 is a feature set of features.

[0030] [Table 2]

[0031] Table 3 shows the rankings converted from Table 2.

[0032] [Table 3]

[0033] FIG. 4 is a distribution diagram of principal components according to an embodiment of the present invention. Referring to FIG. 4, the horizontal axis is the features arranged in numerical order, and the vertical axis is the number of different subjects. Different subjects have different features. For example, the performance of subjects No. 5 and No. 10 on the 17th and 18th features (i.e., the importance represented by different gray scales in the diagram) is different from that of other subjects.

[0034] 2, the processor 12 generates a distance relationship of the normalized feature sets (step S230). Specifically, the distance relationship includes a distance between two of the normalized feature sets. The processor 12 can project the features in the normalized feature sets into the same space to form coordinates, and calculate the spatial distance (i.e., the distance between two coordinates) between the features of different normalized feature sets.

[0035] In one embodiment, the distance relationship is a distance matrix, where each element of the distance matrix is ​​the distance between features of two normalized feature sets. The distance algorithm can be Euclidean distance, cosine similarity, or Kullback-Leibler divergence. For example, a first normalized feature set is [1.5,2.2], a second normalized feature set is [0.1,1.6], and a third normalized feature set is [5.7,4.3]. The distance matrix is ​​[1.52,4.7,6.22], and taking the Euclidean distance algorithm as an example, the square root of (1.5-0.1)^2+(2.2-1.6)^2 is 1.52, and so on.

[0036] The distance relationship is not limited to a matrix format: in other embodiments, the distance relationship may be a comparison table, a mathematical transformation formula, or other relationship that records the distance between different feature sets.

[0037] Referring to Fig. 2, the processor 12 clusters the feature sets according to the distance relationship to generate a plurality of data groups (step S240). Specifically, each data group includes one or more feature sets. The similarity between different feature sets can be known from the distance relationship. Clustering refers to assigning multiple feature sets with high similarity to the same data group. The clustering method may be k-means clustering, hierarchical clustering, or fuzzy clustering.

[0038] For example, FIG. 5 is a schematic diagram of clustering in a hierarchical clustering method according to an embodiment of the present invention. Referring to FIG. 5, each feature set number corresponds to a feature set (e.g., a subject). The processor 12 uses hierarchical clustering to cluster the closest feature sets into one of the data groups. The feature sets can be divided into two groups between numbers 28 and 16 (e.g., feature sets corresponding to subjects numbered 16 and 28). Note that the closest refers to the result of comparison with a distance threshold. If the distance between the two feature sets is smaller than the distance threshold, they are considered to be the two closest feature sets. Otherwise, they are considered to be the two non-adjacent feature sets.

[0039] In one embodiment, the processor 12 can determine group numbers of the data groups, determine cluster distances according to the group numbers, and cluster the feature sets according to the cluster distances. Taking FIG. 5 as an example, when the group number is 2, the cluster distance is 60. The distances between the feature sets with numbers 5, 12, 11, 27, 19, 23, 30, 3, and 28 (e.g., the feature sets corresponding to subject numbers 5, 12, 11, 27, 19, 23, 30, 3, and 28) are within 60, so they are all assigned to the same data group. When the group number is 3, the cluster distance is 50. The distances between the feature sets with numbers 16, 24, 10, 15, and 29 are within 50, so they are all assigned to the same data group.

[0040] Referring to FIG. 2, the processor 12 trains a plurality of machine learning models using the data groups, respectively (step S250). Specifically, after obtaining the clustering result, each data group can be trained separately from other data groups. The machine learning models are trained respectively using different data groups. The processor 12 can train the corresponding machine learning model using a feature set (i.e., a feature set converted from the sensing data) corresponding to each data group or the unconverted sensing data. For example, a first machine learning model is trained using a feature set of the first data group, and a second machine learning model is trained using a feature set of the second data group. The first data group is not used to train the second machine learning model. Furthermore, the machine learning algorithm may be a deep learning, a decision tree, a recurrent neural network (RNN), or other algorithms.

[0041] The following validation results may prove that the cluster training of the embodiments of the present invention facilitates machine learning training.

[0042] FIG. 6 is a schematic diagram of a validation result of training a first group, respectively, according to an embodiment of the present invention. FIG. 7 is a schematic diagram of a validation result of training a second group, respectively, according to an embodiment of the present invention. FIG. 8 is a schematic diagram of a validation result of joint training of multiple groups, according to an embodiment of the present invention. In FIG. 6, FIG. 7, and FIG. 8, the accuracy is the accuracy rate of multiple predicted results obtained by each machine learning model and the actual result. The sensitivity is the ratio of samples determined to be positive among samples that are actually positive. The specificity is the ratio of samples determined to be negative among samples that are actually negative.

[0043] FIG. 6 is a validation result trained using feature sets numbered 5, 12, 11, 27, 19, 23, 30, 3, and 28 in FIG. 5 (e.g., feature sets or raw sensing data corresponding to subjects numbered 5, 12, 11, 27, 19, 23, 30, 3, and 28). FIG. 7 is a validation result trained using other feature sets in FIG. 5 (e.g., feature sets or raw sensing data corresponding to subjects other than subjects numbered 5, 12, 11, 27, 19, 23, 30, 3, and 28). FIG. 8 is a validation result jointly trained using all feature sets in FIG. 5 (e.g., feature sets corresponding to all subjects or raw sensing data). Cluster training (corresponding to FIG. 6 and FIG. 7) is superior to joint training (corresponding to FIG. 8) in accuracy, sensitivity, and specificity. Taking accuracy as an example, under joint training, the accuracy shown in FIG. 8 converges to about 0.7. On the other hand, under cluster training, the accuracy shown in Figures 6 and 7 can converge to 0.7 or higher. The accuracy of Figure 6 for the same data group alone can even converge to about 0.9.

[0044] In addition to optimizing training, an embodiment of the present invention can optimize model prediction. FIG. 9 is a flowchart of data prediction according to an embodiment of the present invention. Referring to FIG. 9, the processor 12 can determine the distance between the prediction data and the data group (step S910). Specifically, the processor 12 may first obtain prediction data. For the prediction data, refer to the above description of the sensing data, and the description will not be repeated here. If necessary, the processor 12 converts the prediction data into a prediction feature set. For the description of the feature conversion, refer to the above description of the conversion of the sensing data into a feature set, and the description will not be repeated here. Next, the processor 12 determines the distance between the prediction feature set and the data group.

[0045] For example, the typical value (e.g., mean, median, or other statistical value) of the first data group is [8.16, 9.8, 3.7, 15.54, 2.74, 4.04, 16.82, 4.56, 21, 11.88, 12.78, 11.1, 9.54, 7.22, 7.24, 18.34, 17.04, 4.24, 20, 12.1, 13.16], and the typical value of the second data group is [4.61, 6.42, 9.95, 5.7, 4, 6.61, 2.85, 10.28, 21, 15.85, 14.66, 12.04, 8.28, 10.38, 9.95, 18.85, 16.42, 3.57, 20, 13.33, 16.09] and the predicted feature set is [10, 13, 6, 16, 2, 3, 17, 5, 21, 9, 15, 12, 8, 7, 4, 19, 18, 1, 20, 11, 14]. Taking Euclidean distance as an example, if the distance between the predicted feature set and the first data group is 7.855, the distance between the predicted feature set and the second data group is 23.495.

[0046] The processor 12 may select a first machine learning model corresponding to a data group having the shortest distance from the prediction data from among the multiple machine learning models (step S920), and predict the prediction data using the first machine learning model (step S930). For example, since 7.855 is smaller than 23.495, the data group having the shortest distance from the prediction feature set is the first data group. The processor 12 may load the first machine learning model of the first data group, input the prediction data into the loaded first machine learning model, and predict the prediction result. For example, if the prediction data is a radar sensing result, the prediction result may be a sleep event. However, the prediction result may be changed according to actual demand.

[0047] It should be noted that in one embodiment, in response to the fact that the distance between the multiple data groups and the prediction data is less than the lower distance limit or greater than the upper distance limit, all of the machine learning models of these data groups may be selected to predict the outcome of the data to be predicted. In another embodiment, in response to the fact that the distance between the data groups and the prediction data is the same or the distance is less than a predetermined value, the processor 12 may load the machine learning models jointly trained by the data groups for prediction.

[0048] In summary, in the data prediction method and device according to the embodiment of the present invention, the feature set is normalized according to the result of dimensionality reduction and further clustered. Then, different data groups are used to train different machine learning models. Furthermore, the machine learning models corresponding to the data groups with similar distances are selected for prediction. This improves the effect of training and prediction.

[0049] The present invention has been described in detail above with reference to the embodiments, but these are not intended to limit the present invention. It should be understood that those skilled in the art can make changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protective scope of the disclosure is defined by the following claims. [Industrial Applicability]

[0050] The data prediction method and apparatus of the present invention can be applied to the field of data prediction technology. [Explanation of symbols]

[0051] 10: Data Prediction Device 11: Memory 12: Processor 15: Sensor PC1~PC11: Main component S201~S250, S910~S930: Step

Claims

1. A processor-implemented method for data prediction, comprising: performing a dimensionality reduction analysis on a plurality of feature sets to obtain an analysis result, each of the plurality of feature sets including at least one feature; clustering the plurality of feature sets according to the analysis results to generate a plurality of data groups, each of the plurality of data groups including at least one of the plurality of feature sets; training a plurality of machine learning models using the plurality of data groups, respectively; determining a plurality of distances between the predicted data and the group of data; Selecting a first machine learning model from the machine learning models, the first machine learning model corresponding to one of the data groups having the shortest distance to the prediction data; predicting a prediction outcome corresponding to the prediction data using the first machine learning model, the machine learning models being each trained based on a different data group; A data prediction method comprising:

2. normalizing the plurality of feature sets according to the analysis results to generate a plurality of normalized feature sets; generating a distance relationship of the plurality of normalized feature sets, the distance relationship comprising a distance between two of the plurality of normalized feature sets; clustering the plurality of feature sets according to the distance relationships to generate the plurality of data groupings; The method of claim 1 , further comprising:

3. The dimensionality reduction analysis is a principal component analysis (PCA) or a principal coordinate analysis (PCoA), and the analysis result includes a ratio of a plurality of principal components, and normalizing the feature set according to the analysis result includes: selecting a first principal component from the principal components, the first principal component being the principal component with the highest ratio among the principal components, or the first principal component being the principal component with the highest ratio among the principal components or the principal component with the second highest ratio among the principal components, and a difference between the principal component with the highest ratio and the principal component with the second highest ratio is less than a threshold value; normalizing the feature set according to the first principal component; or the distance relationship is a distance matrix, each element of the distance matrix being the distance between features of two of the normalized feature sets; or Clustering the feature sets according to the distance relationships includes: clustering the feature sets with the smallest distance relationship into one of the data groups according to the distance relationship by hierarchical clustering; or The data prediction method includes: determining a group number for said data group; determining a cluster distance according to the group number; clustering the feature sets according to the cluster distances; [0033] 3. The data prediction method according to claim 2, further comprising:

4. Converting a plurality of sensing data into the feature set, the sensing data being time-dependent data, and each of the sensing data being a sensing result of a radar; training a corresponding machine learning model based on the feature set or the sensing data corresponding to each of the data groups; The data prediction method of claim 2 , further comprising:

5. A memory for storing program code; performing a dimensionality reduction analysis on a plurality of feature sets to obtain an analysis result, each of the plurality of feature sets including at least one feature; clustering the plurality of feature sets according to the analysis results to generate a plurality of data groups, each of the plurality of data groups including at least one of the plurality of feature sets; training a plurality of machine learning models using the plurality of data groups, respectively; determining a distance between the predicted data and the group of data; Selecting a first machine learning model from the machine learning models, the first machine learning model corresponding to one of the data groups having the shortest distance to the prediction data; predicting a prediction outcome corresponding to the prediction data using the first machine learning model, each of the machine learning models being trained using a different group of data; a processor for loading the program code to execute the A data prediction device comprising:

Citation Information

Patent Citations

  • Cup-shaped bread, method and apparatus for making the same

    JP1989074946A

  • Tool life prediction system

    JP2021071818A