Time series classification device, time series classification program, and time series classification method
By compressing training data into representative series and using fuzzy membership scores, the method addresses high complexity and low accuracy in conventional time series classification, achieving efficient and accurate classification.
Patent Information
- Application Number
- JP2021214286
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2026-01-22
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Conventional time series classification methods face high computational complexity and low accuracy due to the need to calculate Euclidean distances between all event values, lack of consideration for the distribution of event values, and the 'black box' nature of machine learning, which does not explain classification decisions and requires numerous parameters and long calculation times.
A time series classification method that divides training data into classes, compresses data into representative time series with minimum, maximum, and mean values, calculates fuzzy membership scores (FMS values) for test series based on these representatives, and classifies based on the smallest average FMS value, accounting for the distribution of event values.
This approach allows for high-accuracy time series classification with reduced computational cost by considering the distribution of event values, thus improving classification accuracy and reducing calculation complexity.
Smart Images

Figure 0007804319000003 
Figure 0007804319000004 
Figure 0007804319000005
Abstract
Description
[Technical Field]
[0001] The present invention relates to a time series classification device, a time series classification program, and a time series classification method. [Background technology]
[0002] In the real world, various time series (or time series data) are generated. For example, ECG data (electrocardiogram data). A time series is a sequence of values (a series of values) obtained by observing the temporal change of a phenomenon continuously (or discontinuously at regular intervals). For example, it is a data sequence measured over time in statistics or signal processing, and is usually measured at regular time intervals (adapted from Wikipedia).
[0003] Classifying such time series is an important task. For example, as shown in the actual time series data TR_TSDB in Figures 2 and 3 (described later), 16 time series ts1 to ts16 each have 10 event values at timestamps 1 to 10. The 16 time series are then classified into two classes CL (CL=1 and CL=2) of 8 events each.
[0004] Given a classification model (classifier) with the above 16 time series as training data, the time series classifier classifies the test (target) time series into one of two classes based on the model's training data. In the case of the ECG data mentioned above, a classifier using ECG data of various cardiac diseases as training time series will classify the patient's ECG data time series into one of the cardiac diseases.
[0005] Conventional time series classification devices include the shortest Euclidean distance method, RNN, LSTM, and GRU (Recurrent neural network, Long Short Term Memory, Gated recurrent unit, each of which is a type of machine learning). [Prior art documents] [Non-patent literature]
[0006] [Non-Patent Document 1] Fuzzy Classification of Time Series Data, Penugonda Ravikumar, V. Susheela Devi, published on October 8, 2013, 2013 IEEE-FUZZ [Non-patent document 2] Weighted Feature-based Classification of Time Series Data, Penugonda Ravikumar, V. Susheela Devi, published on January 15, 2015, 2014 IEEE-CIDM [Non-patent document 3] A Novel Parameter-Free Energy Efficient Fuzzy Nearest Neighbor Classifier for Time Series Data, Penugonda Ravikumar, R. Uday Kiran, et.al., published July 11, 2021, 2021 FUZZ-IEEE Summary of the Invention [Problem to be solved by the invention]
[0007] The shortest Euclidean distance method detects the training data with the shortest Euclidean distance from the test time series, and classifies the test time series into the detected class of the training data.
[0008] However, this method requires calculating the Euclidean distance between all event values in the test time series and all event values in all training data time series. Therefore, the computational complexity increases when the number of training data time series and the number of event values in each time series are large. Furthermore, since the training data with the N event values most similar to the N (10) timestamp event values in the test time series are detected, the classification accuracy is low. This is because this shortest Euclidean distance method does not take into account the distribution of event values in multiple training data time series.
[0009] Furthermore, machine learning has a black box problem in which it cannot explain why a certain classification was decided, and it requires a huge number of parameters, long calculation times, and is expensive.
[0010] Traditional time series classification methods do not consider the fuzzy nature of event values within a time series. That is, multiple time series belonging to each class have different event values at each timestamp, and the different event values at each timestamp are values within a predetermined range or distribution. In traditional shortest Euclidean distance methods, the training data time series have a single event value at each timestamp. This limits the accuracy of time series classifiers.
[0011] Therefore, an object of a first aspect of this embodiment is to provide a time series classification device, a time series classification program, and a time series classification method that perform classification with high accuracy using a low-cost calculation method with a small amount of calculation. [Means for solving the problem]
[0012] A first aspect of this embodiment is a system including a memory and a processor that accesses the memory, The processor: (1) Divide the actual training time series data into classes, each of which has multiple time series labeled for each class. (2) compressing the actual training time series data of each class, each having a plurality of time series for each of the divided classes, into representative training time series data for each class, each having a minimum value time series, a maximum value time series, and a representative value time series, each having a minimum value, a maximum value, and a representative value between the minimum and maximum values of the event values of each timestamp of the plurality of time series; (3) calculating a plurality of fuzzy membership values (hereinafter referred to as FMS values) for each of the event values of the plurality of timestamps of the test time series to be classified, for each class, based on the representative training time series data of each class; (4) classifying the class having the smallest average value of the FMS values of the plurality of timestamps into the class of the test time series; In the process of (3), the event value of the test time series is If the maximum FMS value is less than or equal to the event value of the minimum value time series or greater than or equal to the event value of the maximum value time series, If the representative value time series event value is equal to the minimum FMS value, When the event value of the test time series is between the minimum value time series and the event value of the representative value time series, a second FMS value that decreases from a first FMS value between the maximum FMS value and the minimum FMS value to a minimum FMS value in response to an increase in the event value of the test time series, a fourth FMS value that increases from the minimum FMS value to a third FMS value between the minimum FMS value and the maximum FMS value in response to an increase in the event value of the test time series when the event value is between the event value of the representative value time series and the event value of the maximum value time series; The time series classifier calculates the FMS values of the event values of the test time series. [Effects of the Invention]
[0013] According to the first aspect, time series classification can be performed with a small amount of calculation, at low cost, and with high accuracy. [Brief explanation of the drawings]
[0014] [Figure 1] 1 is a diagram illustrating a configuration of a time series classification device according to an embodiment of the present invention. [Figure 2] FIG. 10 is a diagram showing actual training time series data TR_TSDB (CL=2) associated with class label CL=2 and test data time series data TST_TSDB. [Figure 3] FIG. 10 is a diagram showing actual training time series data TR_TSDB (CL=1) associated with class label CL=1 and test data time series data TST_TSDB. [Figure 4] 3 is a diagram showing a graph in which the time series ts1 to ts8 of class CL2 in FIG. 2 and the test time series tts17 are plotted. [Figure 5] FIG. 4 is a diagram showing a graph in which the time series data ts9 to ts16 of the class CL1 in FIG. 3 and the test time series tts17 are plotted. [Figure 6] FIG. 10 is a flowchart illustrating a method for classifying test time series of test data by the time series classification device according to the present embodiment. [Figure 7] FIG. 10 is a flowchart of a first example of a process S2 for generating representative training time-series data RP_TSDB. [Figure 8] FIG. 10 is a flowchart showing processing S3. [Figure 9] FIG. 10 is a diagram showing an example of the time series of representative training time series data RP_TSDB2 and the test time series tts17 of class 2 (cl2). [Figure 10] FIG. 10 is a diagram showing an example of the time series of representative training time series data RP_TSDB1 of class 1 (cl1) and the test time series tts17. [Figure 11] FIG. 1 is a diagram illustrating a first example of an FMS function μ. [Figure 12] FIG. 10 is a diagram showing an FMS function μ that calculates an FMS value when α and Δ given by the user are α=0.5 and Δ=0.1. [Figure 13] This is a graph plotting the test time series ts17 and five time series ts_min_2, ts_β_2, ts_mean_2, ts_Γ_2, ts_max_2 of the representative training time series data for class CL=2. [Figure 14]This is a graph plotting the test time series ts17 and five time series ts_min_2, ts_β_2, ts_mean_2, ts_Γ_2, ts_max_2 of the representative training time series data for class CL=1. [Figure 15] FIG. 10 is a flowchart of a second example of a method for generating representative training time-series data RP_TSDB. [Figure 16] FIG. 16 is a diagram showing an FMS function μ in the second example of FIG. DETAILED DESCRIPTION OF THE INVENTION
[0015] FIG. 1 is a diagram showing the configuration of a time series classification device according to this embodiment. The time series classification device 1 is a computer such as a server, a client terminal, a personal computer, a tablet terminal, or a smartphone. The time series classification device 1 includes a processor 10, a main memory 12, a network interface 14, storages 20 to 26, and a bus 28 connecting them. The storage stores a time series classification program 20, actual training time series data 22, representative training time series data 24 generated from the actual training time series data for each class, and test time series data 26 to be classified. The network interface 14 can be connected to multiple client terminal devices 30 and 32 via a network NW.
[0016] The time series classification program 20 is loaded in the main memory 12 and executed by the processor 10. By executing the time series classification program 20, the processor 10 generates representative training time series data 24 from actual training time series data 22 and classifies each test time series in the test time series data 26.
[0017] Univariate time series ts id is a collection of event values that occur over a certain time interval. That is, the time series ts id is expressed as follows: ts id ={v1, v2, ... v c} where vp (1≦p≦c) represents the event value at timestamp p. The length of the time series |ts id | is the event value v p represents the total number c of
[0018] The time series data TSDB is a collection of multiple time series, namely: TSDB={ts1, ts2, ... ts k}, k≧1 The size of the time series data |TSDB| is the number of time series ts present in the time series data TSDB. id The total number of TSDBs is k. |TSDB|=k
[0019] Below, CL is a set of classification labels (class labels), where n is the number of classes. CL={CL1, CL2, ... CL n}, n≧1
[0020] In time series classification, the time series ts, which is an element of the time series data TSDB, id Each is a classification label (class label) clk or cl k (1≦k≦n).
[0021] FIG. 2 shows actual training time series data TR_TSDB(CL=2) associated with class label CL=2 and time series data TST_TSDB of test data. FIG. 3 shows actual training time series data TR_TSDB(CL=1) associated with class label CL=1 and time series data TST_TSDB of test data. The training time series data TR_TSDB(CL=2) and TR_TSDB(CL=1) in FIGS. 2 and 3 are the actual training time series data TR_TSDB in FIG. 1, and each has eight time series ts1-ts8 and ts9-ts16. Each time series ts is assigned a time series ID of 1 to 16. The time series data TST_TSDB of test data in FIGS. 2 and 3 shows only one test time series tts17.
[0022] The first time series TS1 in the training time series data TR_TSDB (CL=2) in FIG. 2 is as follows: ts1:{10,9,8,8,7,6.9,6,6,4,3.8}:2 Here, ts1 is a time series, and {10,9,8,8,7,6.9,6,6,4,3.8} is a sequence of event values in ascending timestamp order. The size of this time series is |ts id |=|{10,9,8,8,7,6.9,6,6,4,3.8}|=10. In other words, the first time series in Figure 2 contains 10 event values. The same applies to the other time series ts2 to ts16 and the test time series tts17. Furthermore, the size of the training time series data TR_TSDB(CL=2) and TR_TSDB(CL=1) is |TSDB|=16, and the set of class labels is CL={1,2}.
[0023] FIG. 4 is a graph plotting the time series ts1 to ts8 of class CL2 in FIG. 2 and the test time series tts17. FIG. 5 is a graph plotting the time series data ts9 to ts16 of class CL1 in FIG. 3 and the test time series tts17. In both FIGS. 4 and 5, the horizontal axis corresponds to timestamps 1 to 10, and the vertical axis corresponds to the event value of each timestamp. The test time series tts17 of the test data is indicated by a dashed line, and the time series ts1 to ts16 of the training data are indicated by a solid line. When plotted on a graph, the time series ts1 to ts8 (solid line) of the training time series data of class label CL2 in FIG. 4 and the time series ts9 to ts16 (solid line) of the training time series data of class label CL1 in FIG. 5 appear in clearly different regions. As shown in Figures 4 and 5, it is visually confirmed that the test time series tts17 (dashed line) of the test data is similar to the time series ts1 to ts8 (solid lines) of the training time series data of class label CL2.
[0024] However, in the real world, the number of training time series that make up a time series classification model is enormous, and the number of class labels is also large. It is expected that the range of event values in the time series of training time series data that belong to each class label will be approximated in a complex manner.
[0025] As mentioned above, in the conventional shortest Euclidean distance method, it is necessary to calculate the Euclidean distance between all event values of the test time series of the test data and all event values of all time series of the training time series data. Therefore, if the number of time series of the training time series data and the number of event values of each time series are large, the amount of calculation becomes enormous.
[0026] Furthermore, since the training time series with the N event values most similar to the event values of the N timestamps (the 10 mentioned above) in the test time series of the test data is detected, the classification accuracy is not high. This is because the shortest Euclidean distance method does not take into account the distribution of event values in the training time series. For example, in Figure 4, one time series in the training time series has event values that are significantly different from the event values in the other time series. In this case, the sum or average Euclidean distance of all event values may be very large based on the event values in the test time series that deviate significantly from the distribution of the training time series, which may result in incorrect classification.
[0027] 6 is a flowchart showing a method for classifying test time series of test data by the time series classification device according to this embodiment. The processor shown in FIG. 1 executes the time series classification program 20 to perform the following processes.
[0028] That is, the processor 10 acquires actual training time series data TR_TSDB classified into multiple classes (S1). The actual training time series data TR_TSDB is, for example, the time series data TR_TSDB (CL=2) and TR_TSDB (CL=1) shown in Figures 2 and 3. The actual training time series data TR_TSDB is a set of actually acquired time series, and is training time series data for a time series classification model.
[0029] Next, the processor 10 compresses (converts) the actual training time series data TR_TSDB for each class into representative training time series data RP_TSDB for each class (S2). The representative training time series data RP_TSDB is time series data having a time series of the minimum value min, first percentile β, representative value (average, median, mode, midrange, etc.), second percentile Γ, and maximum value max of the event values at timestamps of the multiple time series included in the actual training time series data TR_TSDB for each class. The minimum value, first percentile, representative value, second percentile, and maximum value represent the distribution of the event values at each timestamp of the multiple training time series. Details will be described later.
[0030] Then, for the test time series of the test time series data TST_TSDB, the processor 10 calculates fuzzy membership values (hereinafter referred to as FMS values) for the event values of the test time series based on the representative training time series data of each of the multiple classes (S3). That is, for each event value of the test time series, the same number of FMS values as the number of classes are calculated. In step S3, the average value of the FMS values for each event value of the test time series is further calculated for each class as the FMS distance FMSD.
[0031] Specifically, the below-minimum, minimum, first percentile, representative value, second percentile, maximum, and above-maximum values of the representative training time series data are assigned the respective fuzzy membership values FMS_V. For example, the below-minimum and above-maximum values are assigned the maximum FMS value, FMS_V=1.0, the representative value is assigned the minimum FMS value, FMS_V=0, the minimum value is assigned the first FMS value between the maximum and minimum FMS values, FMS_V=α=0.5, and the maximum value is assigned the second FMS value between the maximum and minimum FMS values, FMS_V=Δ=0.5.
[0032] The FMS value FMS_V is preferably a normalized value between 0 and 1.0, but it is sufficient if the representative FMS_V is the minimum FMS value, the FMS_V below the minimum value and above the maximum value is the maximum FMS value, and the FMS_V of the minimum and maximum values is a value between the minimum and maximum FMS values. Details will be explained in Figures 9 and 10, etc. Then, the FMS value FMS_V for the event value of the test time series is calculated based on the representative training time series data and the assigned FMS value. Details will be explained in Figure 8.
[0033] Then, processor 10 determines the class with the smallest average FMS value for the test time series as the class of the test time series (S4). The FMS value is a value that takes into account the distribution of event values at each timestamp. Therefore, the method of determining the class with the smallest average FMS value takes into account the fuzzy nature of the actual training time series data.
[0034] 7 is a flowchart of a first example of the process S2 for generating representative training time series data RP_TSDB. The processor 10 of the time series classification device executes the time series classification program 20 to perform the following process S2 for generating representative training time series data RP_TSDB.
[0035] The processor 10 acquires the actual training time series data TR_TSDB (S21). Then, the processor executes the following processes S23-S25 for the actual training time series data TR_TSDB of each class (S22-S26).
[0036] The actual training time series data TR_TSDB for a certain class includes multiple time series ts. The processor calculates the minimum value min, the first percentile β, and representative values (such as the mean, median, mode, or midrange) of the event values v at each timestamp for the multiple time series ts for a certain class, such as the mean value mean, the second percentile Γ, and the maximum value max (S23-S25). The mean value mean may be any representative value. In this embodiment, the mean value mean is used as an example of the representative value. The processes S23-S25 are performed for the actual training time series data for all classes. As a result, the minimum value, the first percentile, the mean value, the second percentile, and the maximum value of the event values at each timestamp of the time series included in each of the actual training time series data TR_TSDB for all classes are calculated.
[0037] The actual training time series data of each class clk in the actual training time series data TR_TSDB is clk Let δ be a statistical parameter specified by the user. δ={minimum, β-percentile, mean, Γ-percentile, maximum} The processor executes step S24 to calculate the statistical parameter δ of each class.
[0038] The processor uses the statistical parameter δ for each class to generate a class cl containing a large number of time series ts. k Actual training time series data TSDB clk , a small set of representative training time series data RP_TSDB(^TSDB clk (^ is TSDB clk The symbol above)) is used to compress (or convert) ^TSDB clk ={ts min clk , ts β clk , ts mean clk , ts Γ clk , ts max clk} The above element ts min clk , ts β clk , ts mean clk , ts Γ clk , ts max clk class cl k These represent the minimum, β-percentile, mean, Γ-percentile, and max for each event or timestamp calculated using the time series data.
[0039] Class cl k Actual training time series data TSDB clk Representative training time series data from TSDB clk The formula for compressing (or converting) to is:
[0040]
number
[0041] Fig. 9 is a diagram showing an example of the time series of representative training time series data RP_TSDB2 of class 2 (cl2) and the test time series tts17. Fig. 10 is a diagram showing an example of the time series of representative training time series data RP_TSDB1 of class 1 (cl1) and the test time series tts17. These two representative training time series data are calculated from the actual training time series data TR_TSDB(CL=2) of class 2 and the actual training time series data TR_TSDB(CL=1) of class 1 in Figs. 2 and 3, respectively.
[0042] The time series {ts_min_2, ts_β_2, ts_mean_2, ts_Γ_2, ts_max_2} in Figure 9 is the time series {ts min clk , ts β clk , ts mean clk , ts Γ clk , ts max clk}. The same applies to the time series {ts_min_1, ts_β_1, ts_mean_1, ts_Γ_1, ts_max_1} in Figure 10.
[0043] For example, the event value 9.5 at timestamp 1 of time series ts_min_2 in Figure 9 is the minimum value of the event values at timestamp 1 of the eight time series ts1 to ts8 in the actual training time series data TR_TSDB (CL=2) in Figure 2. The same is true for the other timestamps 2 to 10. Furthermore, the event values at timestamps 2 to 10 in time series ts_β_2, ts_mean_2, ts_Γ_2, and ts_max_2 in Figure 9 are also the β percentile, mean, Γ percentile, and maximum value, respectively, of the event values at timestamps 2 to 10 in the eight time series ts1 to ts8 in the actual training time series data TR_TSDB (CL=2) in Figure 2.
[0044] The 10 event values of the time series {ts_min_1, ts_β_1, ts_mean_1, ts_Γ_1, ts_max_1} in Figure 10 are similarly calculated from the event values of timestamps 1 to 10 of the eight time series ts9 to ts16 in the actual training time series data TR_TSDB (CL=1) in Figure 2.
[0045] FIG. 8 is a flowchart of step S3. In step S3, the processor calculates fuzzy membership values for the event values of the test time series based on the representative training time series data. That is, the processor 10 first obtains the test time series tts in the test time series data TST_TSDB (S31). Then, the processor calculates the fuzzy membership values for each class cl. k For the representative training time series data RP_TSDB (S32-S37), an FMS value FMS_V for the event values of each timestamp 1-10 of the test time series is calculated based on the event values of each time series ts_min_clk to ts_max_clk of the representative training time series data (S33-S35).
[0046] Furthermore, the processor calculates the average value of the FMS values for the event values of each timestamp in the test time series (S36). This average value of the FMS values is the FMS distance (fuzzy membership distance) of the test time series to the representative training time series data of each class. The processor calculates the FMS distance between the test time series and the representative training time series data RP_TSDB of each class CL (S36, S37). Thereafter, as shown in process S4 of FIG. 6, the processor determines the class with the smallest average value of the FMS values (FMS distance) as the class of the test time series tts (S4).
[0047] In step S34 of FIG. 8, the processor calculates the FMS values of the event values at each timestamp of the test time series by interpolating the FMS values previously assigned to each time series ts_min_clk, ts_β_clk, ts_mean_clk, ts_Γ_clk, and ts_max_clk of the representative training time series data.
[0048] Specifically, the class cl k Let tts be the test time series for which we need to estimate (1≦k≦n). id Let the test time series tts id The FMS function μ that determines the distance (FMS value) between the event value of and the distribution of multiple event values of the representative training time series data RP_TSDB is as follows:
[0049]
number
[0050] FIG. 11 is a diagram showing a first example of the FMS function μ. The horizontal axis represents the time series ts id Event value ts at timestamp i id .v i The vertical axis is the FMS value (= μ). The thick solid line in Figure 11 represents the test time series tts id Event value tts id .v i indicates the FMS value FMS_V corresponding to the time series of the representative training time series data RP_TSDB from below the event value of ts_min_clk to above the event value of ts_max_clk.
[0051] The FMS function μ in Fig. 11 is the test time series tts id The following FMS values μ are calculated according to the following seven cases (a) to (g): a Calculate. (a) tts id .v a ≤ ts_min_clk.v a In the case of μ a =1 (b) ts_min_clk.v a <tts id .v a ≦ts_β_clk.v a In the case of μ a =α (c) ts_β_clk.v a <tts id .v a <ts_mean_clk.v a In the case of μ a = α × A (d) tts id .v a =ts_mean_clk.v a In the case of μ a =0 (e) ts_mean_clk.v a <tts id .v a <ts_Γ_clk.v a In the case of μ a =Δ×B (f) ts_Γ_clk.v a ≦tts id .va <ts_max_clk.v a In the case of μ a =Δ (g) tts id .v a ≧ts_max_clk.v a In the case of μ a =1 A=(ts_mean_clk.v a -tts id .v a ) / (ts_mean_clk.v a -ts_β_clk.v a ) B=(tts id .v a -ts_mean_clk.v a ) / (ts_Γ_clk.v a -ts_mean_clk.v a ) where 0≦α≦1, 0≦Δ≦1, a is the timestamp, and β and Γ are chosen from percentiles between 0 and 100.
[0052] In particular, in (b), ts_min_clk.v a <tts id .v a ≦ts_β_clk.v a In the case of μ a = α × A (A = 1). Therefore, the coefficient A, which decreases from FMS value = α to FMS value = 0 in response to an increase in the event value of the test time series in (b) and (c), changes from A = 1 to A = (ts_mean_clk.v a -tts id .v a ) / (ts_mean_clk.v a -ts_β_clk.v a )
[0053] Similarly, in (f), ts_Γ_clk.v a ≦tts id .v a <ts_max_clk.v a In the case of μ a=Δ×B(B=1). Therefore, the coefficient B that increases from FMS value = 0 to FMS value = Δ in response to the increase in the event value of the test time series in (f) and (e) is B=(tts id .v a -ts_mean_clk.v a ) / (ts_Γ_clk.v a -ts_mean_clk.v a ) to B=1.
[0054] The basic idea behind the FMS function above is as follows. First, as in (a) and (g), if the event value at a certain timestamp in the test time series is either less than the minimum or greater than the maximum event value in the time series for a certain class, the FMS value μ is assigned 1. Second, if this is not the case (if it is between the minimum and maximum values, as in (b) through (f)), the FMS value μ is assigned values α×A and Δ×B, which correspond to α and Δ, between 0 and 1, depending on the proximity of the event value in the representative training time series to the mean. If the event value in the test time series cannot be predicted and the event value in the test time series is significantly smaller than the minimum or larger than the maximum value in the representative training time series (as in (a) or (g)), this prevents the FMS value from becoming extremely large. In other words, classification into an inappropriate class due to noise in the event value in the test time series is suppressed.
[0055] Second, when the event value of the test time series is between the minimum value min and the first percentile β of the representative training time series data, and between the second percentile Γ and the maximum value max (cases (b) and (f)), it corresponds to the extreme values (extreme values) of the distribution of event values at each timestamp of the actual training time series data. Therefore, as in (b) and (f), the FMS value μ for extreme values is a constant value α or Δ. As a result, when the event value of the test time series is between β and Γ, which is close to the mean value, which is the representative value of the distribution, but is not an extreme value, a smaller value is assigned to the FMS value μ. As a result, when the event value of the test time series is in the region close to the mean value of the distribution, the FMS distance is small, facilitating classification into the appropriate class.
[0056] 12 is a diagram showing an FMS function μ for calculating an FMS value when the user-specified α and Δ are α=0.5 and Δ=0.1. An example of calculating an FMS value of the test time series tts17 based on the representative training time series data RP_TSDB2 of class CL=2 shown in FIG. (1) The first event value of tts17 is 9.4. This value is smaller than ts_min_2=9.5, so μ1=1.0 (2) The second event value of tts17 is 10.2. This value is equal to ts_Γ_2=10.2 (≒10.15) and μ2=0.1 (3) The third event value of tts17 is 8.18. This value is between ts_β_2=8 and ts_mean_2=8.54, and μ3=α×A=0.5×(8.54-8.18) / (8.54-8)=0.33 (4) The fourth event value of tts17 is 8.3. This value is between ts_mean_2=7.9 and ts_Γ_2=8.46, and μ4=Δ×B=0.1×(8.3-7.9) / (8.46-7.9)=0.07 (5) Repeat the same process to calculate the FMS values for the remaining event values of tts17, μ5 to μ 10 are 0.28, 1, 0.08, 0.19, 0.3, and 0.38.
[0057] FMS values μ1 to μ at each timestamp of the test time series tts17 10 After calculating based on the representative training time series data of class 2, the processor calculates the fuzzy membership distance FMSD (S4 in FIG. 6). Specifically, the FMS distance FMSD is calculated by dividing the FMS values μ1 to μ 10 The FMS distance is the average value of the FMS values obtained by dividing the sum of the timestamps by the number of timestamps. In the above example, the FMS distance between the test time series tts17 and the representative training time series data of class 2 is FMSD = 0.849.
[0058] Similarly, the processor calculates the FMS values μ1 to μ2 for each timestamp in the test time series tts17. 10 is calculated based on the representative training time series data of class 1, and the average value is calculated.
[0059] The processor then calculates the FMS distance FMSD for the test time series tts17 based on the representative training time series data for all remaining classes. k The FMS distance between the representative training time series data is normalized to a value between 0 and 1. The closer the FMS distance is to 0, the closer the class is to that class, and the closer the FMS distance is to 1, the farther the class is from that class. Therefore, the processor determines that the class corresponding to the smallest FMS distance FMSD is the class to which the test time series tts17 belongs (S4 in Figure 6).
[0060] The FSM value α for the minimum time series event value ts_min_clk.va and the FSM value Δ for the maximum time series event value ts_max_clk.va of the representative training time series data are selected by the user. For example, the FSM values α and Δ may be selected to obtain the highest accuracy by repeatedly performing the evaluation process of the time series classification method. Similarly, the first percentile β and the second percentile Γ may be selected as optimal values.
[0061] Figure 13 is a graph plotting the test time series tts17 and five time series ts_min_2, ts_β_2, ts_mean_2, ts_Γ_2, and ts_max_2 of the representative training time series data for class CL=2. In contrast, Figure 14 is a graph plotting the test time series tts17 and five time series ts_min_2, ts_β_2, ts_mean_2, ts_Γ_2, and ts_max_2 of the representative training time series data for class CL=1.
[0062] In Figure 13, the event values at each timestamp of the dashed test time series tts17 are within the distribution of the five time series ts_min_2, ts_β_2, ts_mean_2, ts_Γ_2, and ts_max_2 of the representative training time series data for class CL=2, and are close to the event values of the mean time series ts_mean_2 at many timestamps. On the other hand, in Figure 14, many of the event values at each timestamp of the dashed test time series tts17 are outside the distribution of the five time series of the representative training time series data for class CL=1. In the example above, it is relatively easy to determine that the test time series tts17 belongs to class 2 rather than class 1 when plotted on a graph.
[0063] FIG. 15 is a flowchart of a second example of a method for generating representative training time series data RP_TSDB. The flowchart of FIG. 15 differs from the flowchart of the first example of FIG. 7 in step S24_2. The remaining steps are the same. For multiple time series ts of a certain classification, the processor calculates the minimum value min of the event value v of each timestamp, and among representative values (mean, median, mode, midrange, etc.), for example, the mean value mean and the maximum value max (S23-S25). The mean value mean may be any of the representative values. In other words, in the second example of FIG. 15, the first percentile β and second percentile Γ of the first example of FIG. 7 are not calculated.
[0064] Fig. 16 is a diagram showing the FMS function μ in the second example of Fig. 15. As in Fig. 11, the horizontal axis represents the event value tsid.vi of the timestamp i of the time series tsid, and the vertical axis represents the FMS value (=μ).
[0065] The FMS function μ in Fig. 16 is the test time series tts id Event value tts id .v a The following FMS values μ are obtained according to the following five cases: a Calculate. (a) tts id .v a ≤ ts_min_clk.v a In the case of μ a =1 (c) ts_min_clk.v a <tts id .v a <ts_mean_clk.v a In the case of μ a = α × A (d) tts id .v a =ts_mean_clk.v a In the case of μ a =0 (e) ts_mean_clk.v a <tts id .v a <ts_max_clk.v a In the case of μ a =Δ×B (g) tts id .v a ≧ts_max_clk.v a In the case of μ a =1 A=(ts_mean_clk.v a -ttsid.v a ) / (ts_mean_clk.va -ts_min_clk.v a ) B=(ttsid.v a -ts_mean_clk.v a ) / (ts_max_clk.va -ts_mean_clk.v a )
[0066] (c) in Figure 16 corresponds to (b) and (c) in Figure 11, and (e) in Figure 16 corresponds to (e) and (f) in Figure 11. In the second example in Figure 16, coefficients A and B are unchanged.
[0067] The FMS function shown in Figure 11 is a function for a normal distribution in which the distribution of event values of multiple time series ts in a certain class has extreme values on the minimum and maximum sides. A normal distribution is a distribution in which the bin with the highest frequency is located in the center.
[0068] The FSM function shown in Figure 12 is a function for a skewed distribution of event values of multiple time series ts in a certain class. A skewed distribution is a distribution in which bins with high frequencies are located at positions shifted from the center. The example in Figure 12 is an FSM function suitable for a skewed distribution in which bins with high frequencies are biased toward the maximum value side.
[0069] Furthermore, the FMS function shown in Figure 16 is a function suitable for a normal distribution in which the distribution of event values of multiple time series ts in a certain class does not have extreme values on the minimum or maximum side. Because there are no extreme values on either end of the distribution, this FMS function does not have a calculation such as Figures 11 and 12, in which the FMS value is α between the minimum value min and the first percentile β, or the FMS value is Δ between the second percentile Γ and the maximum value max. The FMS functions shown in Figures 11 and 12 are suitable for a distribution that has extreme values on both ends of the distribution.
[0070] According to the fuzzy nearest neighbor classification (Fuzzy NNC) method of time series in this embodiment, the class of a test time series is determined using representative training time series data RP_TSDB for each class, which is converted from the actual training time series data TR_TSDB for each class. Therefore, the computational complexity of the fuzzy nearest neighbor classification method is on the order of the number of classes n (O(n)). In contrast, the computational complexity of other time series classification methods is on the order of the number m of training time series (O(m)). Because the number of time series m in real-world time series data is far greater than the number n of classes, the fuzzy nearest neighbor classification method is more preferable than other time series classification methods in terms of memory capacity, runtime time, and energy consumption.
[0071] The fuzzy nearest neighbor classification method of this embodiment has the following two stages. The first stage is an offline stage in which a processor compresses the actual training time series data TR_TSDB for each given class into representative training time series data RP_TSDB for that class. The second stage is an online stage in which a processor calculates the FMS distance between the test time series and the representative training time series data for each class. The processor then determines the class with the smallest FMS distance as the class of the test time series.
[0072] As described above, according to this embodiment, test time series can be classified with a small memory amount, a short runtime, low power consumption, and high accuracy. [Explanation of symbols]
[0073] 1: Time series classifier 20: Time series classification program 22. TR_TSDB: Real training time series data 24. RP_TSDB: Representative training time series data 26. TST_TSDB: Time series data of test data tsid, ts id :Time series TSDB: Time Series Data min:minimum value β: 1st percentile mean: average value (an example of a representative value) Γ: 2nd percentile max: Maximum value FMS_V: Fuzzy membership value FMSD: Fuzzy Membership Distance clk, cl k :class, classification
Claims
1. Memory and a processor accessing the memory; The processor: (1) Dividing actual training time series data into classes, each of which has multiple time series labeled with a class; (2) compressing the actual training time series data of each class, each having a plurality of time series for each of the divided classes, into representative training time series data for each class, each having a minimum value time series, a maximum value time series, and a representative value time series, each having a minimum value, a maximum value, and a representative value between the minimum and maximum values of the event values of each timestamp of the plurality of time series; (3) calculating a plurality of fuzzy membership values (hereinafter referred to as FMS values) for each of the event values of the plurality of timestamps of the test time series to be classified, for each class, based on the representative training time series data of each class; (4) classifying the class having the smallest average value of the FMS values of the plurality of timestamps as the class of the test time series; In the process (3), the event value of the test time series is If the maximum FMS value is less than or equal to the event value of the minimum value time series or greater than or equal to the event value of the maximum value time series, When the event value of the representative value time series is equal to the minimum FMS value, When the event value of the test time series is between the minimum value time series and the representative value time series, a second FMS value that decreases from a first FMS value between the maximum FMS value and the minimum FMS value to a minimum FMS value in response to an increase in the event value of the test time series, a fourth FMS value that increases from the minimum FMS value to a third FMS value between the minimum FMS value and the maximum FMS value in response to an increase in the event value of the test time series when the event value is between the event value of the representative value time series and the event value of the maximum value time series; A time series classifier that calculates FMS values for each of the event values of the test time series.
2. a first coefficient for decreasing the second FMS value at a first percentile between an event value in the minimum value time series and an event value in the representative value time series; The time series classification device according to claim 1 , wherein a second coefficient for increasing the fourth FMS value changes at a second percentile between the event value of the representative value time series and the event value of the maximum value time series.
3. the factor by which the second FMS value between the minimum time series event value and the first percentile is reduced is 1; 3. The time series classifier of claim 2, wherein the factor by which the fourth FMS value between the second percentile and the maximum time series event value increases is one.
4. The time series classification device according to claim 1 , wherein the representative value is one of a mean value, a median value, a mode value, and a mid-range value.
5. (1) Dividing actual training time series data into classes, each of which has multiple time series labeled with a class; (2) compressing the actual training time series data of each class, each having a plurality of time series for each of the divided classes, into representative training time series data for each class, each having a minimum value time series, a maximum value time series, and a representative value time series, each having a minimum value, a maximum value, and a representative value between the minimum and maximum values of the event values of each timestamp of the plurality of time series; (3) calculating a plurality of fuzzy membership values (hereinafter referred to as FMS values) for each of the event values of the plurality of timestamps of the test time series to be classified, for each class, based on the representative training time series data of each class; (4) classifying the class having the smallest average value of the FMS values of the plurality of timestamps as the class of the test time series; In the process (3), the event value of the test time series is If the maximum FMS value is less than or equal to the event value of the minimum value time series or greater than or equal to the event value of the maximum value time series, When the event value of the representative value time series is equal to the minimum FMS value, When the event value of the test time series is between the minimum value time series and the representative value time series, a second FMS value that decreases from a first FMS value between the maximum FMS value and the minimum FMS value to a minimum FMS value in response to an increase in the event value of the test time series, a fourth FMS value that increases from the minimum FMS value to a third FMS value between the minimum FMS value and the maximum FMS value in response to an increase in the event value of the test time series when the event value is between the event value of the representative value time series and the event value of the maximum value time series; Calculating FMS values for each of the event values of the test time series; A time series classification program having program code for causing a computer to execute a process.
6. (1) Dividing actual training time series data into classes, each of which has multiple time series labeled with a class; (2) compressing the actual training time series data of each class, each having a plurality of time series for each of the divided classes, into representative training time series data for each class, each having a minimum value time series, a maximum value time series, and a representative value time series, each having a minimum value, a maximum value, and a representative value between the minimum and maximum values of the event values of each timestamp of the plurality of time series; (3) calculating a plurality of fuzzy membership values (hereinafter referred to as FMS values) for each of the event values of the plurality of timestamps of the test time series to be classified, for each class, based on the representative training time series data of each class; (4) classifying the class having the smallest average value of the FMS values of the plurality of timestamps as the class of the test time series; In the process (3), the event value of the test time series is If the maximum FMS value is less than or equal to the event value of the minimum value time series or greater than or equal to the event value of the maximum value time series, When the event value of the representative value time series is equal to the minimum FMS value, When the event value of the test time series is between the minimum value time series and the representative value time series, a second FMS value that decreases from a first FMS value between the maximum FMS value and the minimum FMS value to a minimum FMS value in response to an increase in the event value of the test time series, a fourth FMS value that increases from the minimum FMS value to a third FMS value between the minimum FMS value and the maximum FMS value in response to an increase in the event value of the test time series when the event value is between the event value of the representative value time series and the event value of the maximum value time series; Calculating FMS values for each of the event values of the test time series; A time series classification method in which processing is performed by a processor.
Citation Information
Patent Citations
Device and method for comparing signal waveform data
JP1995146938A
Pattern sorting device and state monitoring system utilizing the device
JP1995334479A
Method and apparatus for electro-biometric identity recognition
JP2013150806A
Visit prediction
WO2020227525A1