Method and device for generating synthetic time sequence
The synthetic time series is generated through dynamic time regularization algorithm, which solves the problem of label imbalance, optimizes the training data set, and improves the accuracy and reliability of the machine learning model, especially classification and exception recognition in the manufacturing process.
Patent Information
- Application Number
- CN202510136359.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-02-07
- Filing Date
- 2025-02-07
- Publication Date
- 2025-08-08
AI Technical Summary
The prior art model bias caused by time series data of label imbalance during the manufacturing process affects the accuracy and reliability of classification and anomaly identification models, especially when the "OK" category frequency is higher than the "NOK" category.
The time series density matrix is generated by dynamic time regularization algorithm, and the synthetic time series shift path is generated by iteratively, and the time series density matrix and reference time series are used to generate the synthetic time series, expand the training data set, and optimize the balance of the model training data.
It improves the performance of machine learning models, reduces resource consumption and hyperparameter sensitivity, provides an interpretable synthetic time series generation method, and improves the generalization ability and abnormal recognition ability of the model.
Smart Images

Figure CN120448801A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method and apparatus for generating synthetic time series to expand a training dataset of training time series for training a machine learning model. The present invention also relates to a method for training a machine learning model. The present invention also relates to an inference method. The present invention also relates to a control device. The present invention also relates to a computer program and a computer-readable data carrier. Background Art
[0002] At the heart of modern manufacturing processes lies the generation and analysis of data, which is crucial for maintaining product quality and production line efficiency. Time series data, recorded during the manufacturing process and providing deep insights into production dynamics, plays a special role here.
[0003] However, a key aspect of this data is its tendency towards label imbalance, where the "OK" class for non-defective processes or parts appears significantly more frequently than the "NOK" class for defective processes or parts. This imbalance causes classical classification and anomaly detection models trained on these time series to develop a tendency towards over-representation. categories, which will affect the accuracy and reliability of the model.
[0004] To overcome these challenges, synthetic generation of time series data has become increasingly important. This approach aims to create a balance in the training dataset by learning and emulating the representative features of real time series data, thereby improving model performance.
[0005] Of particular note here are neural network-based techniques, which represent the current state-of-the-art in synthetic time series generation. Specialized generative adversarial networks (GANs), such as TimeGAN and DoppelGanger, as well as probabilistic methods, such as probabilistic autoregressive models (PARs), are at the core of these approaches to effectively address the challenges of unbalanced time series data in manufacturing.
[0006] Even though methods for generating synthetic time series are already known, there is still potential for development.
[0007] The object of the present invention is therefore to specify an improved method and / or an improved device for generating a synthetic time series.
[0008] This object is achieved by a method for generating synthetic time series to expand a training dataset for a training time series according to the features of patent claim 1. This object is achieved by a method for training a machine learning model according to the features of patent claim 10. This object is achieved by an inference method according to the features of patent claim 11. This object is achieved by a control device according to the features of patent claim 12. This object is achieved by an apparatus for generating synthetic time series to expand a training dataset for a training time series according to the features of patent claim 13. Summary of the Invention
[0009] According to a first aspect, a method for generating a synthetic time series to expand a training dataset of training time series for training a machine learning model is described, the method for generating comprising:
[0010] Providing the following time series density matrix, wherein the time series density matrix is extracted from the training time series based on the time series shift path generated by the dynamic time warping algorithm;
[0011] Based on the time series shift path, a leading time series shift path (Leitzeitreihenverschiebungspfade) is provided;
[0012] Provide a reference time series based on the training time series;
[0013] The synthetic time series shift path is generated by iteratively performing the following steps:
[0014] Starting from a corresponding starting position in the time series density matrix, determining a probability of a next possible position of the synthetic time series shift path based on the time series density matrix, wherein the starting position in the time series density matrix preferably corresponds to the corresponding starting position of the synthetic time series shift path;
[0015] Identifying the position of these next possible positions at which the distance to the shift path of the preceding time series is minimized;
[0016] varying the determined probabilities of the next possible positions of the synthetic time series shift path to be generated based on predetermined hyperparameters of the preceding time series shift path;
[0017] setting a next position of the synthetic time series shift path by randomly selecting a position from the changed next possible positions;
[0018] A synthetic time series is generated according to the synthetically generated time series shift path and a reference time series to expand the training dataset of the training time series.
[0019] It should be understood that the steps and other optional steps according to the present invention do not necessarily have to be performed in the order shown, but may also be performed in another order. In addition, other intermediate steps may be provided. Each of the steps may also include one or more sub-steps, without departing from the scope of the method according to the present invention.
[0020] According to a second aspect, an apparatus for generating synthetic time series to expand a training dataset of training time series for training a machine learning model is described. The apparatus comprises an evaluation and / or computing device configured to perform the following steps:
[0021] Providing a time series density matrix, wherein the time series density matrix is extracted from a training time series based on a time series shift path generated by a dynamic time warping algorithm;
[0022] Based on the time series shift path, a leading time series shift path is provided;
[0023] Provide a reference time series based on the training time series;
[0024] The synthetic time series shift path is generated by iteratively performing the following steps:
[0025] Starting from a corresponding starting position in the time series density matrix, determining a probability of a next possible position of the synthetic time series shift path based on the time series density matrix, wherein the starting position in the time series density matrix preferably corresponds to the corresponding starting position of the synthetic time series shift path;
[0026] identifying the position among these next possible positions at which the distance to the preceding time series shift path is minimized;
[0027] changing the determined probability of a next possible position of a synthetic time series shift path to be generated based on predetermined hyperparameters of a preceding time series shift path;
[0028] setting a next position of the synthetic time series shift path by randomly selecting a position from the changed next possible positions;
[0029] A synthetic time series is generated according to the synthetically generated time series shift path and a reference time series to expand the training dataset of the training time series.
[0030] The statements made for the method apply accordingly to the device. It should be understood that the features described in the method can be restated for the device according to common language practice without explicitly listing such statements here.
[0031] The present invention relates to a method for generating a synthetic time series that can subsequently be used, for example, to train an anomaly detector. It is proposed that a DTW algorithm be used to obtain a matrix representation of the time series. The synthetic time series is then preferably sampled from the matrix representation.
[0032] Dynamic Time Warping (DTW) is an algorithm that measures the similarity between sequences / time series that may differ in speed or length. Here, the elements of two time series are adapted to each other so that the sum of the distances between paired elements is minimized. This distinguishes DTW from other distance metrics (such as Euclidean distance), which are based on a strict one-to-one assignment between points in the sequence and therefore cannot tolerate any time shift or stretching between sequences. First, DTW creates a matrix in which the rows and columns correspond to the elements of the two time series. Each element of the matrix represents the distance between the points of the two sequences. The distance between each pair of points in the two time series is calculated (usually by using Euclidean distance) and entered into the matrix. DTW traverses the matrix to find the route / path with the minimum cumulative distance. The route represents the optimal assignment between the points in the two time series. The route / path is selected so that each point in each sequence is assigned at least once and the assignment minimizes the total distance. Optionally, the cumulative distance is divided by the number of steps in the route in order to normalize the effects of sequence length.The advantage of DTW is its flexibility in handling time series that are of different length or shifted in time.
[0033] The method for generating a synthetic time series can also be understood as a method for training a DTW algorithm. Then, a synthetic time series can be generated based on the trained DTW algorithm. Preferably, a large number of time series are generated by this method. This time series shift path can also be understood as a time series distortion path or a time series expansion path.
[0034] Preferably, the method starts at index position (0, 0) of the time series density matrix as the initial starting position for generating the corresponding synthetic time series shift path. Starting from there, a new time series shift path is then sampled iteratively (for each index position), in particular until a certain size and / or a termination criterion is reached.
[0035] To generate synthetic time series, the present invention derives a new 2D representation of the time series shift path from the time series density matrix. With the aid of a reference time series, the sampled 2D representation of the time series shift path can then be transformed back into the original (one-dimensional or multidimensional) time series space. The proposed DTW-based method for generating synthetic time series is more efficient and better interpretable than existing methods for generating synthetic time series.
[0036] The present invention alleviates the shortcomings of the prior art in neural networks for generating time series, including their high resource consumption, their sensitivity to hyperparameters and their lack of interpretability. The proposed method for generating synthetic time series uses an efficient open source implementation of the dynamic time warping algorithm. The generation itself is performed based solely on a 2D representation of a set of time series shift paths. This requires almost no storage and computing power. In addition, the method can generate realistic synthetic time series using a small fraction (Bruchteil) of the training data required for the neural network. Therefore, the method is more efficient than methods for generating synthetic time series data using existing deep neural networks. Preferably, the method for generating only needs to be based on a small number of hyperparameters, in particular specified by the user. The method also uses a simple (deterministic) algorithm for creating synthetic time series from the sampled 2D representation of the time series shift paths. Therefore, the proposed method is interpretable.
[0037] The method for generating synthetic time series data is an upstream part of the machine learning toolchain. It does not directly improve the machine learning system used in the following applications, but rather is a generative model used to generate and expand training and / or test data. Once a machine learning model is trained in this way, it can then be used in an optimized manner.
[0038] In one embodiment, providing a time series density matrix includes:
[0039] Calculating corresponding time series shift paths between a reference time series and corresponding training time series based on a dynamic time warping algorithm; and
[0040] Aggregate the computed time series shift paths into a time series density matrix.
[0041] The time series shift path is preferably calculated for each time series of the training time series or at least for a part of the time series of the training time series. The method uses dynamic time warping (DTW) to calculate the corresponding time shift path between each training time series and the reference time series. The corresponding time shift path preferably defines a set of index pairs, which describes the best possible match in terms of similarity between the corresponding training time series and the reference time series. In particular, for each index in the (training) time series, the closest corresponding index in the reference time series is identified by dynamic time warping (DTW). The time series shift path can be represented / mapped by a 2D matrix, which contains a "1" in each field corresponding to an index match (Indexübereinstimmung) and a "0" otherwise.
[0042] By aggregating or adding the 2D time-shift matrices of the time-shift paths of the analyzed training time series, a time series density matrix representing the time-shift density in the training data can be determined. The time series density matrix describes the time-regularity characteristics of the training set. New synthetic time-shift paths can then be iteratively derived from this time series density matrix. The synthetic time-shift paths are then used to generate a synthetic time series.
[0043] In one embodiment, weighting of the time series shift paths is performed before aggregation.
[0044] These weights may be set, for example, by a user or determined in other ways.
[0045] In one embodiment, the reference time series can be selected by a user from a training time series or other time series data set, or can be extracted from the training time series, in particular can be extracted by forming an average value over at least a portion of the training time series, or can be determined by calculating the center of gravity (Baryzentrum) of at least a portion of the training time series to be used as a reference.
[0046] The center of gravity is preferably a hypothetical and / or synthetic time series that minimizes the DTW distance to all training time series. The reference time series can also be provided in other ways, for example based on historical data.
[0047] In one embodiment, the leading time series shifting path is randomly selected from the time series shifting paths.
[0048] The random criterion by which this is determined is essentially arbitrary. Therefore, random time-shift paths are extracted from a training data set that is intended to serve as a "guide" for generating the synthetic time series shift paths.
[0049] In one embodiment, the iterative execution is performed until a termination criterion is reached, in particular a predetermined path size and / or path length of the time series shift path to be synthetically generated is reached.
[0050] In principle, the number of iterations can also be used as a termination criterion. Alternatively or in addition, the length of the reference time series can also be used as a termination criterion.
[0051] In one embodiment, determining the probability of the next possible position of the synthetic time series shift path based on the time series density matrix includes: determining the Markov probability of these next possible positions based on the starting position in the time series density matrix, in particular by dividing the corresponding count values in the time series density matrix by their corresponding sum.
[0052] Preferably, the Markov probabilities of the possible next positions are determined based on the respective current position in the time series density matrix (which changes for each iteration step), whereby the probabilities of the possible next positions are determined for a step to the right, for a step upwards and / or for a step diagonally from the respective starting position. In particular, this is done by dividing the respective count values in the time series density matrix by their sum.
[0053] In one embodiment, the hyperparameter comprises a sampling temperature of the preceding time series shift path, which can in particular be set by a user.
[0054] The sampling temperature describes a hyperparameter that describes the randomness of the sampling distance of the preceding time series shift path. The sampling temperature is preferably set to less than 1. In addition, the next possible step closest to the sampled preceding time series shift path is preferably identified. The change in probability is preferably performed according to the set sampling temperature. If the sampling temperature is 0, the newly generated time series shift path preferably follows the preceding time series shift path exactly. The sampling temperature is preferably set to approximately 0.5.
[0055] In one embodiment, generating a synthetic time series according to the synthetically generated time series shift path and the reference time series includes:
[0056] The discrete time series values of the reference time series are compared (Abgleichen) with the corresponding index positions of the synthetically generated time series shift path to produce corresponding discrete synthetically generated time series values; and missing values are optionally interpolated and / or the synthetic time series generated based on the discrete synthetic time series values is smoothed.
[0057] For each position in the synthetically generated time series shift path, the corresponding value from the reference time series is preferably appended to New time series. If the position of the synthetically generated time series shift path is associated with multiple values in the reference time series, their average value is preferably appended to the time series to be generated. In this way, the information in the reference time series is not lost. If multiple positions of the synthetically generated time series shift path are associated with the same value of the reference time series, this value is preferably only appended to the time series to be generated once, and unassigned values (NaN) are set at the remaining positions. If the same value of the reference time series is repeatedly appended to the time series to be generated, the synthetic time series to be generated will look like a step function (i.e., it will have multiple platforms) because dynamic time warping results in discrete position matching. This situation should be avoided. It is particularly preferred to perform interpolation on NaN values. Preferably, a smoothing window of a predetermined size can also be applied. In this way, an interpolated and / or smoothed synthetic time series can be provided.
[0058] A method for training a machine learning model for classification or anomaly detection, in particular in a production process, is also described. The method comprises the following steps:
[0059] Providing an extended training data set of a training time series, wherein the training data set is extended by a synthetically generated time series according to the present method for generating a synthetic time series;
[0060] Training a machine learning model based on the expanded training dataset; and
[0061] Provide trained machine learning models for classification or anomaly identification, particularly in production processes.
[0062] The proposed algorithm can be trained in a supervised and unsupervised manner. In a supervised training scenario, these steps are preferably performed independently of each other for each class.
[0063] Here, protection is also claimed for an inference method for classification or anomaly detection, in particular in a production process. The inference method comprises the following steps:
[0064] Provide time series data recorded by sensors; and
[0065] Classify the provided time series data and / or identify anomalies in the provided time series data through the machine learning model trained here.
[0066] The inference method can also be used to analyze sensor data. Sensors can record environmental measurements in the form of sensor signals. These sensor signals can be one-dimensional or multi-dimensional time series, for example, from repeatable processes (e.g., extrusion or tightening procedures).
[0067] The inference method and / or generation method of the present invention can also be used to identify anomalies in technical systems. For example, synthetic time series can be generated to extend an existing time series dataset in order to enlarge it and / or make it more balanced (e.g., "OK" / "NOK" time series). Training a machine learning model to identify anomalies based on an extended dataset results in improved model performance compared to training based solely on the original recorded time series.
[0068] Here, protection is also claimed for a control device that is used for partially automated or automated driving functions of motor vehicles and / or drones and / or is included in robotic systems and / or industrial machines and / or for optical inspection, and on which a machine learning model trained according to the present invention can be executed.
[0069] The present method for generating synthetic time series can be useful in all cases where machine time series learning models suffer from the effects of unbalanced training data. The present method for generating synthetic time series is particularly preferably used for identifying anomalies in production processes, which include, for example, time series sensor data with differences (anomalies) between the "OK" and "NOK" ratios (Anteil), such as temperature data, pressure data, force data and / or torque data, purely by way of example. That is, known machine learning models for identifying anomalies tend to ignore the differences between "OK" and "NOK" in time series, especially when the model is trained on "OK" instances. The present method for generating synthetic time series can cope with this characteristic, because synthetic time series can be generated to obtain a more balanced (ausgewogener) training set of training time series (e.g., also covering NOK), and thus improve the generalization ability in anomaly identification. The same advantages also apply to the classification of time series, for example when more common or less common error types should be distinguished. The present method for generating synthetic time series can prevent overfitting / overfitting when training machine learning models
[0070] The present method for generating synthetic time series is also useful for expanding training data sets from the real world, for example, if the recorded data is (structurally) technically complex and / or expensive. For example, it is also possible that a large amount of time series data, for example from mobile smart devices or smart home devices, cannot be provided for data protection reasons. The present method for generating synthetic time series makes it possible to expand small data sets and use them for training models. Similarly, it may be expensive to transmit vehicle sensor measurements via the cloud in order to collect a large amount of training data. The present method for generating synthetic time series makes it possible to expand small data sets and use them for training models. The present method for generating synthetic time series makes it possible to generate synthetic time series based on only a small number of time series. Here, it is preferred that the initial time series that can be used for the generation enables a realistic 2D time-shift representation. This is an advantage of the present invention, because, in comparison, known methods based on neural networks, for example, require a large amount of training data in order to generate realistic (realistisch) synthetic time series.
[0071] Protection is also claimed for a computer program having a program code for carrying out at least part of the method according to the invention in one of its embodiments when the computer program is executed on a computer. In other words, according to the invention, the computer program (product) comprises instructions which, when the program is executed by a computer, cause the computer to carry out the method in one of its embodiments / the steps of the method according to the invention.
[0072] Here, a computer-readable data carrier having program code of a computer program is also proposed, in order to carry out at least part of the method according to the invention in one of its embodiments when the computer program is executed on a computer. In other words, the invention relates to a computer-readable (storage) medium comprising instructions which, when executed by a computer, cause the computer to carry out the method in one of its embodiments / the steps of the method according to the invention.
[0073] The described embodiments and refinements can be combined with one another as desired.
[0074] Further possible embodiments, developments, and implementations of the invention also include combinations, not explicitly mentioned, of features of the invention described above or below with reference to the exemplary embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] The accompanying drawings are intended to provide a further understanding of the embodiments of the present invention. They illustrate multiple embodiments and, together with the description, are used to explain the principles and solutions of the present invention.
[0076] Further embodiments and many of the advantages mentioned are described with reference to the drawings. The elements shown in the drawings are not necessarily shown to scale with respect to one another.
[0077] in:
[0078] Figure 1 A schematic flow chart illustrating an embodiment of a method for generating a synthetic time series;
[0079] Figure 2 A schematic diagram showing the determination of a time-warping path (Time-Wrapping-Pfades);
[0080] Figure 3 A schematic diagram showing the determination of a time series density matrix;
[0081] Figure 4 shows a schematic flow chart for generating a synthetic time-warping path; and
[0082] Figure 5 A schematic diagram for generating a synthetic time series based on a synthetic time warping path is shown.
[0083] Throughout the figures of the drawings, unless otherwise indicated, like reference numerals indicate like or functionally like elements, components, or assemblies. DETAILED DESCRIPTION
[0084] Figure 1 A schematic flow chart of a method for generating synthetic time series to expand a training dataset of training time series for training a machine learning model is shown.
[0085] In any embodiment, the method can be performed at least in part by an apparatus 100, which can include a number of components not shown in detail, such as one or more providing devices and / or at least one evaluation and calculation device. It should be understood that the providing device can be co-designed with the evaluation and calculation device or can be different from it. In addition, the apparatus can include a storage device and / or an output device and / or a display device and / or an input device.
[0086] According to the present invention, the computer-implemented method comprises at least the following steps:
[0087] In step S1 , a time series density matrix is provided, wherein the time series density matrix is extracted from a training time series based on a time series shift path generated by a dynamic time warping algorithm.
[0088] In step S2, a leading time-series shift path is provided based on the time-series shift path.
[0089] In step S3, a reference time series is provided based on the training time series;
[0090] In step S4, a synthetic time series shift path is generated by iteratively performing the following steps:
[0091] In step S41, starting from the corresponding starting position in the time series density matrix, the probability of the next possible position of the synthetic time series shift path is determined based on the time series density matrix, wherein the starting position in the time series density matrix preferably corresponds to the corresponding starting position of the synthetic time series shift path
[0092] In step S42, the position among these next possible positions is identified at which the distance to the preceding time series shift path is minimized.
[0093] In step S43 , the determined probabilities of the next possible positions of the synthesized time series shift path to be generated are changed based on predetermined hyperparameters of the preceding time series shift path.
[0094] In step S44 , the next position of the synthesized time-series shift path is set by randomly selecting a position from the changed next possible positions.
[0095] In step S5, a synthetic time series is generated according to the synthetically generated time series shift path and the reference time series to expand the training data set of the training time series.
[0096] Figure 2 A schematic diagram of a 2D matrix representation 202 of a training time series 200 converted to a time series shift path 204 by a dynamic time warping algorithm is shown. Here, the time series shift path 204 is calculated between a reference time series 206 and the training time series 200 based on the dynamic time warping algorithm. The time series shift path can be represented / mapped by the 2D matrix 202, where the 2D matrix contains a "1" in each field corresponding to an index match between the reference time series 206 and the training time series 200, and contains "0"s (not shown or left blank) otherwise.
[0097] Figure 3 A schematic diagram is shown for generating a time series density matrix 300. After the corresponding 2D matrix representations 202 of the corresponding time series shift paths 204 are prepared for each subset or at least one subset of the training time series 200, the calculated 2D matrix representations 202 of the time series shift paths 204 are aggregated or summarized into the time series density matrix 300.
[0098] Figure 4The following illustrates how to generate a synthetic time series shift path 204' based on a density matrix. Starting from a corresponding starting position 400, initially position (0, 0) in the time series density matrix 300, which preferably also corresponds to the starting position of the later synthetic time series shift path 204', the probability 401 of the next possible position of the synthetic time series shift path 204' is determined based on the time series density matrix 300. Furthermore, the position of these next possible positions that minimizes the distance from the preceding time series shift path 402 is then identified. Furthermore, the determined probabilities 401 of these next possible positions of the synthetic time series shift path 204' to be generated are modified to 401' based on predetermined hyperparameters of the preceding time series shift path. The next position 404 of the synthetic time series shift path 204' is set by randomly selecting a position from these modified next possible positions. Iterations are then performed until a termination criterion is met, in particular, a predetermined path size and / or path length of the synthetically generated time series shift path 204' is reached.
[0099] Figure 5 The following illustrates how a synthetic time series 500 can be generated based on a synthetically generated time series shift path 204' and a reference time series 206. Here, discrete time series values 502 of the reference time series 206 are compared with corresponding index positions 504 of the synthetically generated time series shift path 204' to generate corresponding discrete, synthetically generated time series values 506. Optionally, interpolation can also be performed for missing values and / or smoothing can be performed on the synthetic time series 500 generated based on the discrete synthetic time series values 506. In this manner, an interpolated and / or smoothed synthetic time series 500' can then preferably be provided. For each position in the synthetically generated time series shift path 204', the corresponding value 502 in the reference time series 206 is preferably appended to the new time series 500. If a position in the synthetically generated time series shift path 204' is associated with multiple values 502 in the reference time series 206, then the average M of these values is preferably appended to the time series 500 to be generated. In this way, information in the reference time series 206 is not lost. If multiple locations of the synthetically generated time series shift path 204' are associated with the same value 502 of the reference time series 206, this value is preferably only appended to the generated time series 500 once, and unassigned values NaN are set at the remaining locations. These NaN values are particularly preferably interpolated. A smoothing window of a predetermined size may also be preferably applied.
Claims
1. A method for generating a synthetic time series (500) to expand a training dataset of training time series (200) for training a machine learning model, wherein the method for generating comprises: Providing (S1) a time series density matrix (300) as follows, wherein the time series density matrix is extracted from a training time series (200) based on a time series shift path (204) generated by a dynamic time warping algorithm; providing (S2) a leading time series shift path (402) based on the time series shift path (204); providing (S3) a reference time series (206) based on the training time series (200); The synthetic time series shift path (204') is generated (S4) by iteratively performing the following steps: Starting from a corresponding starting position (400) in the time series density matrix (300), determining (S41) a probability (401) of a next possible position of the synthetic time series shift path (204') based on the time series density matrix (300), wherein the corresponding starting position in the time series density matrix (300) preferably corresponds to the corresponding starting position of the synthetic time series shift path (204'); identifying ( S42 ) the one of the next possible positions that minimizes the distance from the preceding time series shift path ( 402 ); changing (S43) the determined probabilities (401, 401') of the next possible positions of the synthetic time series shift path (204') to be generated based on predetermined hyperparameters (H) of the preceding time series shift path (402); Setting (S44) a next position (404) of the synthetic time series shift path (204') by randomly selecting a position from the changed next possible positions; A synthetic time series (500, 500') is generated (S5) based on the synthetically generated time series shift path (204') and the reference time series (206) to expand a training data set of a training time series (200).
2. The method according to claim 1, wherein Providing (S1) the time series density matrix (300) includes: Calculating a corresponding time series shift path (204) between the reference time series (206) and the corresponding training time series (200) based on a dynamic time warping algorithm; and The calculated time series shift paths (204) are aggregated into a time series density matrix (300).
3. The method according to claim 2, wherein weighting of the time series shift paths (204) is performed before the aggregation.
4. A method according to any of the preceding claims, wherein the reference time series (206) can be selected by a user from the training time series (200) or other time series data set, or can be extracted from the training time series (200), in particular can be extracted by forming an average value via at least a part of the training time series (200), or can be determined by calculating the center of gravity of at least a part of the training time series (200).
5. A method according to any one of the preceding claims, wherein The leading time series shifting path (402) is randomly selected from the time series shifting paths (204).
6. The method according to any of the preceding claims, wherein the iteration (S4) is performed until a termination criterion is reached, in particular a predetermined path size and / or path length of the time series shift path (204') to be synthetically generated is reached.
7. The method according to any one of the preceding claims, wherein determining (S41) a probability (401) of a next possible position (204') of the synthetic time series shift path (204') based on the time series density matrix (300) comprises: Based on the starting position (400) in the time series density matrix (300), the Markov probability of the next possible position is determined, in particular by dividing the corresponding count values in the time series density matrix by their corresponding sum.
8. A method according to any one of the preceding claims, wherein The hyperparameter (H) comprises a sampling temperature of the leading time series shift path (402), wherein the sampling temperature can in particular be set by a user.
9. The method according to any of the preceding claims, wherein generating (S5) a synthetic time series (500, 502') from the synthetically generated time series shift path (204') and the reference time series (206) comprises: Comparing the discrete time series values (502) of the reference time series (206) with corresponding index positions (504) of the synthetically generated time series shift path (204') to generate corresponding discrete synthetically generated time series values (506); and optionally interpolating missing values and / or smoothing the synthetic time series (500') generated based on the discrete synthetic time series values.
10. A method for training a machine learning model for classification or anomaly identification, particularly in a production process, the method comprising the steps of: - providing an extended training data set of training time series, wherein the training data set is extended by a synthetically generated time series (500, 500') according to a method according to any of the preceding claims; - training the machine learning model based on the expanded training dataset; and - Provide trained machine learning models for classification or anomaly identification, particularly in production processes.
11. A method for classification or anomaly identification, in particular in a production process, comprising the following steps: Provide time series data recorded by sensors; and The provided time series data is classified or anomalies in the provided time series data are identified by using the machine learning model trained according to the method according to claim 10. 12 . A control device for automated driving functions of motor vehicles, for automated functions of drones, robots and / or for automated optical inspection of components and / or samples, wherein the control device is designed to carry out the method according to claim 11 .
13. An apparatus (100) for generating synthetic time series to expand a training dataset of training time series for training a machine learning model, the apparatus (100) having an evaluation and / or computing device designed to perform the following steps: Providing (S1) a time series density matrix (300) as follows, wherein the time series density matrix is extracted from a training time series (200) based on a time series shift path (204) generated by a dynamic time warping algorithm; providing (S2) a leading time series shift path (402) based on the time series shift path (204); providing (S3) a reference time series (206) based on the training time series (200); The synthetic time series shift path (204') is generated (S4) by iteratively performing the following steps: Starting from a corresponding starting position (400) in the time series density matrix (300), determining (S41) a probability (401) of a next possible position of the synthetic time series shift path (204') based on the time series density matrix (300), wherein the corresponding starting position in the time series density matrix (300) preferably corresponds to the corresponding starting position of the synthetic time series shift path (204'); identifying ( S42 ) the one of the next possible positions that minimizes the distance from the preceding time series shift path ( 402 ); changing (S43) the determined probabilities (401, 401') of the next possible positions of the synthetic time series shift path (204') to be generated based on predetermined hyperparameters (H) of the preceding time series shift path (402); Setting (S44) a next position (404) of the synthetic time series shift path (204') by randomly selecting a position from the changed next possible positions; A synthetic time series (500, 500') is generated (S5) based on the synthetically generated time series shift path (204') and the reference time series (206) to expand a training data set of a training time series (200).
14. A computer program having a program code for performing at least part of the method according to any one of claims 1 to 11 when the computer program is executed on a computer. 15 . A computer-readable data carrier having a program code of a computer program for performing at least parts of the method according to claim 1 , when the computer program is executed on a computer.