Auxiliary GAN table data generation method based on auto-encoder and regression model

By using autoencoders and regression models to assist in generating adversarial networks, the problems of structural imbalance and distribution deviation in tabular data generation are solved, high-precision tabular data generation is achieved, and data availability and predictive adaptability are improved.

CN120633720APending Publication Date: 2025-09-12SICHUAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510727230.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing generative adversarial networks generate unbalanced results in tabular data generation, and the output variables deviate from the actual distribution, resulting in insufficient accuracy and practicality of the generated data during modeling, prediction, or decision analysis.

Method used

The autoencoder and regression model auxiliary generator are used to generate tabular data through missing value preprocessing, correlation matrix calculation, time series segmentation and cross-validation of multiple machine learning models, combined with generative adversarial networks to ensure data integrity, internal consistency and high-precision prediction capabilities.

Benefits of technology

It improves the availability, authenticity, and predictive adaptability of generated tabular data, ensures that the generated data conforms to the actual distribution, reduces modeling interference, and improves data accuracy and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120633720A_ABST
    Figure CN120633720A_ABST
Patent Text Reader

Abstract

The invention discloses an auxiliary GAN table data generation method based on an auto-encoder and a regression model, and particularly relates to the technical field of data generation and modeling. The method comprises the following steps: compressing and reconstructing original input variable characteristics through an auto-encoder to extract a potential representation structure; and fitting prediction is carried out on the output variables in combination with multiple machine learning models, a regression model with the optimal performance is screened out through cross validation, and accurate modeling of the incidence relation between the input variables and the output variables is achieved. A generative adversarial network model is constructed, real data is taken as guidance, the reconstruction capability of an auto-encoder and the prediction capability of a regression model are fused, and the quality of virtual table data generated by a generator is optimized, so that the accuracy of generated data in terms of semantic structure, variable distribution and prediction effectiveness is improved. The method is suitable for a structured scene with input and output field features, and high-quality synthetic data generation under the small sample condition is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data generation and modeling, and more specifically, to a method for generating GAN tabular data based on an autoencoder and a regression model. Background Art

[0002] Existing structured tabular data generation methods have significant shortcomings in processing data scenarios where there is a strong logical dependency between input and output variables. Especially when data samples are scarce or data collection is limited, traditional generative models find it difficult to accurately simulate the real mapping relationship between variables.

[0003] Although the commonly used generative adversarial networks have achieved good results in generating unstructured data such as images, they often encounter problems in generating tabular data, such as imbalanced generation structure and deviation of output variables from the actual distribution. This results in insufficient accuracy and practicality of the generated data when used for modeling, prediction or decision analysis. Summary of the Invention

[0004] In order to overcome the above-mentioned defects of the prior art, an embodiment of the present invention provides a method for generating table data based on an autoencoder and a regression model to assist GAN to solve the problems raised in the above-mentioned background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] The method for generating tabular data using an autoencoder and regression model to assist GAN includes the following steps:

[0007] S1: Preprocess the missing values ​​of the original table data of emergency medical equipment transfer with input variables and output variables recorded by the equipment and remove the time column and feature row;

[0008] S2: Calculate the correlation matrix for the preprocessed data, draw the correlation heat map, and segment the preprocessed tabular data according to time series;

[0009] S3: Input the segmented real data into the autoencoder to reconstruct the real data;

[0010] S4: Cross-validation score when selecting a machine learning model to predict the dataset and performing 5-fold cross-validation on each machine learning model;

[0011] S5: Input the processed real data into the machine learning model with the best prediction performance in the dataset, and use it as a regression model to predict the real data.

[0012] In a preferred embodiment, S1 is specifically:

[0013] The original table data of emergency medical equipment transfer with input variables and output variables recorded by the equipment is used as the data set to be processed;

[0014] All entries with missing values ​​in the dataset to be processed are filled or deleted, and the columns recording time and irrelevant or redundant feature rows in the dataset to be processed are removed to obtain a complete table dataset that has been processed for missing values ​​and does not contain time information columns and redundant feature rows.

[0015] In a preferred embodiment, S2 is specifically:

[0016] Based on a complete table data set that has been processed for missing values ​​and does not contain time information columns and redundant feature rows, the correlation between each input variable and between the input variables and the output variables in the table data set is calculated to obtain the correlation coefficient matrix between the variables;

[0017] According to the correlation coefficient matrix between variables, a correlation heat map is drawn in the form of a matrix heat map;

[0018] According to the time series of data collection, the complete table data set that has been processed for missing values ​​and does not contain time information columns and redundant feature rows is segmented to obtain the real data subset segmented by time series.

[0019] In a preferred embodiment, S3 is specifically:

[0020] Input the subset of real data segmented by time series into the pre-built autoencoder model for forward propagation. The encoder network encodes the input data to form the potential feature representation of the data.

[0021] The latent feature representation of the data is decoded and reconstructed through the decoder network to generate reconstructed data consistent with the dimension of the input data;

[0022] The generated reconstructed data is compared with the corresponding input data, the reconstruction error is calculated, and the reconstruction error is used to perform backpropagation optimization on the autoencoder model to form a trained autoencoder model.

[0023] In a preferred embodiment, S4 is specifically:

[0024] Select linear regression model, decision tree model, random forest model, lightweight gradient boosting model, support vector regression model and multilayer perceptron model as candidate machine learning models;

[0025] The complete table dataset that has been processed for missing values ​​and does not contain time information columns and redundant feature rows is used as training data, and each candidate machine learning model is trained separately;

[0026] Each candidate machine learning model adopts the five-fold cross-validation method during the training process, and the average value of the mean square error obtained by five cross-validations of each candidate machine learning model is used as the performance evaluation indicator. The machine learning model with the best prediction performance is determined based on the performance evaluation indicator.

[0027] In a preferred embodiment, S5 is specifically:

[0028] The complete table data set that has been processed for missing values ​​and does not contain time information columns and redundant feature rows is divided into input variable data and output variable data, and both are input into the machine learning model with the best prediction performance;

[0029] The machine learning model with the best prediction performance takes the input variable data as input and obtains the predicted output variable data through forward calculation;

[0030] The error between the output variable data predicted by the machine learning model with the best prediction performance and the actual output variable data is calculated to obtain the prediction error;

[0031] The prediction error is used to reversely adjust the machine learning model with the best prediction performance to form a fully trained regression model.

[0032] The technical effects and advantages of the present invention's method for generating tabular data using an autoencoder and a regression model are as follows:

[0033] By performing missing value preprocessing and structural redundancy cleaning on the original table data, data integrity and field standardization are guaranteed, and subsequent modeling interference is reduced; by calculating the correlation matrix and visualizing the degree of correlation between variables, combined with time series segmentation, the generative model can capture the dynamic correlation and temporal structure between variables; with the help of autoencoders, the original data is compressed and reconstructed to extract latent space features, which helps to improve the internal consistency of the generated data; by evaluating the performance of multiple machine learning models in output variable prediction, it is ensured that the introduced regression model has high-precision prediction capabilities; through the regression model, modeling supervision of the relationship between input and output variables is achieved, guiding the generator to output data that is more in line with the actual distribution, significantly improving the availability, authenticity and predictive adaptability of the generated table data. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 Schematic diagram of the present invention's method for generating tabular data using an autoencoder and regression model-assisted GAN. DETAILED DESCRIPTION

[0035] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0036] Example

[0037] Figure 1 The present invention provides a method for generating table data using an autoencoder and a regression model to assist GAN, which includes the following steps:

[0038] S1: Preprocess the missing values ​​of the original table data of emergency medical equipment transfer with input variables and output variables recorded by the equipment and remove the time column and feature row;

[0039] S2: Calculate the correlation matrix for the preprocessed data, draw the correlation heat map, and segment the preprocessed tabular data according to time series;

[0040] S3: Input the segmented real data into the autoencoder to reconstruct the real data;

[0041] S4: Cross-validation score when selecting a machine learning model to predict the dataset and performing 5-fold cross-validation on each machine learning model;

[0042] S5: Input the processed real data into the machine learning model with the best prediction performance in the dataset, and use it as a regression model to predict the real data.

[0043] Specifically, the real data used for network pre-training and training comes from the SWP dataset. The pre-training process samples the data at a frequency of 15 minutes, so that the collected data for one day becomes an "image" with a size of 96*12 two-dimensional matrix. In the process of machine learning model selection, the LR model selects the default parameters; the maximum depth of the DT model is set to [None, 10, 20, 30], and the minimum split sample is [2, 5, 10]; the number of trees of the RF model is set to [100, 200], the maximum depth is [None, 10, 20], and the minimum split sample is [2, 5]; the number of trees of the LightGBM model is [200, 300], the learning rate is [0.05, 0.1], the tree depth is [7, 9], the maximum leaf tree is [63, 127], and the leaf node is minimum. The number of samples is [20, 50], the L1 regularization parameter is [0.1, 0.3], the L2 regularization parameter is [0.1, 0.3], and the feature sampling ratio is [0.7, 0.9]; the regularization parameter of the SVR model is [0.1, 1, 10], the tolerance error is [0.01, 0.1], and the model kernel is ['linear', 'rbf']; the hidden layer dimension of the MLP model is [(50,), (100,), (50, 25)], the learning rate is [0.001, 0.0001], and the batch size is [32, 64].

[0044] During the training process, the generator network layer parameters need to be set first, which are specifically described as follows: the input random noise is a 6*1 matrix, the first layer parameters are kernel size 4, the number of kernels 256, the step size 2, the padding 1, and the output is 256*12*2; the second layer parameters are kernel size 4, the number of kernels 128, the step size 2, the padding 1, and the output is 128*24*4; the third layer parameters are kernel size 4, the number of kernels 64, the step size 2, the padding 1, and the output is 64*48*8; the fourth layer parameters are kernel size 4*5, the number of kernels 32, the step size (2,1), the padding (1,0), and the output is 32*96*12; the LSTM has three layers, the hidden layer size is 256; the residual connection input and output sizes are both 256.

[0045] Secondly, the parameters of the discriminator network layer are set as follows: the first layer parameters are kernel size 4, number of kernels 64, step size 2, padding 1, and the output is 64*48*6; the second layer parameters are kernel size 4, number of kernels 128, step size 2, padding 1, and the output is 128*24*3; the third layer parameters are kernel size 4*3, number of kernels 256, step size 2, padding 1, and the output is 256*12*2; the fourth layer parameters are kernel size 4*2, number of kernels 512, step size 2, padding (1,0), and the output is 512*6*1; the fifth layer parameters are kernel size 6*1, number of kernels 1, and the output is 1*1*1;

[0046] The AE model uses the AdamW optimizer with an initial learning rate of 0.005 to update the corresponding weight gradients; the regression model selects the LightGBM model, and the parameters are set to 300 trees, a learning rate of 0.1, a tree depth of 9, a maximum leaf tree of 127, a minimum number of leaf node samples of 20, an L1 regularization parameter of 0.3, an L2 regularization parameter of 0.1, and a feature sampling ratio of 0.9; the generator uses the Adam optimizer with an initial learning rate of 0.0001 to update the corresponding weight gradients, the reconstruction loss weight is 5.0, and the prediction MSE weight is 5.0; the discriminator uses the Adam optimizer with an initial learning rate of 0.0001 to update the corresponding weight gradients, and the gradient penalty coefficient is set to 10; both optimizers use the cosine annealing learning rate scheduler, the number of epochs in a single cycle is 500, and the minimum learning rate within the cycle is 0.00001.

[0047] S1: Preprocess the missing values ​​of the original table data of emergency medical equipment transfer with input variables and output variables recorded by the equipment and remove the time column and feature rows, including:

[0048] The original table data of emergency medical equipment transfer with input variables and output variables recorded by the equipment is used as the data set to be processed;

[0049] All entries with missing values ​​in the dataset to be processed are filled or deleted, and the columns recording time and irrelevant or redundant feature rows in the dataset to be processed are removed to obtain a complete table dataset that has been processed for missing values ​​and does not contain time information columns and redundant feature rows.

[0050] Specifically, in the dataset to be processed, some fields may contain null values ​​or incomplete entries due to transient signal loss during the sensing process of some devices. To ensure stability during subsequent model training, missing value processing is first performed on this dataset. This includes the following two situations:

[0051] For records with a small number of random missing values ​​in the input variable fields, numerical filling is performed based on the mean of the column vector;

[0052] For continuously missing or logically invalid fields, the cleanup method is to directly remove complete rows containing missing values.

[0053] The goal is to remove outliers that could shift the data distribution or increase noise, thereby obtaining a complete set of input and output fields. The entire missing value processing process is performed in a Python environment using a structured data framework, ensuring that the processed tabular data maintains dimensional uniformity and field integrity.

[0054] The timestamp fields recorded in the original tabular data are primarily used for historical retrospection and traceability statistical analysis. However, in the autoencoder and regression model-assisted training framework of the present invention, this time information does not constitute an independent input feature; its temporal order will be subsequently implemented using time series slicing. Therefore, in this step, all fields related to the acquisition time, recording time, or event occurrence time are explicitly deleted from the tabular data that has completed missing value processing to prevent redundant information from interfering with the spatial feature extraction of the input variables.

[0055] When reporting tabular data, some devices often include multiple descriptive fields such as titles, comments, and category identifiers. These unstructured or non-standard fields do not fall within the scope of input or output variables and are referred to as redundant feature rows. In this step, through field name normalization, field unit comparison, and field value stability testing, we systematically identify and eliminate all fields with no direct logical connection to input or output variables.

[0056] For example, in a typical data record, there are fields such as record number, uploader, and remarks. These fields are neither dependent variables nor explanatory variables in the prediction model, so they are uniformly cleared to ensure that the final set of fields retained strictly corresponds to the two categories of input variables and output variables.

[0057] After completing missing value processing, deleting time columns, and eliminating redundant feature rows, the resulting new table dataset will only contain structured fields for modeling and analysis. This dataset has the following characteristics:

[0058] Each row of records corresponds to a set of emergency equipment transfer events;

[0059] All input variable fields have non-null values, standardized units, and consistent formats;

[0060] All output variable fields have passed quality control verification and are logically predictable;

[0061] There is no redundant information overlap between fields, which facilitates subsequent variable correlation modeling and time series segmentation.

[0062] The network adopted is the Wasserstein Generative Adversarial Network with Gradient Penalty (WGAN-GP) hybrid deep convolution and LSTM network, and the generator structure is four layers of transposed convolution plus three layers of LSTM network plus residual connection.

[0063] S2: Calculate the correlation matrix for the preprocessed data, draw a correlation heat map, and segment the preprocessed tabular data according to time series, including:

[0064] Based on a complete table data set that has been processed for missing values ​​and does not contain time information columns and redundant feature rows, the correlation between each input variable and between the input variables and the output variables in the table data set is calculated to obtain the correlation coefficient matrix between the variables;

[0065] According to the correlation coefficient matrix between variables, a correlation heat map is drawn in the form of a matrix heat map;

[0066] According to the time series of data collection, the complete table data set that has been processed for missing values ​​and does not contain time information columns and redundant feature rows is segmented to obtain the real data subset segmented by time series.

[0067] Specifically, using a well-structured table dataset, select all input and output variable fields in turn, organize them into a standard two-dimensional array format, and input them into the analysis module. By calling the statistical analysis function, the linear correlation coefficient between any two variable fields is calculated. The correlation metric used is the Pearson linear correlation coefficient. The calculation process is as follows:

[0068] Convert any two variable fields into one-dimensional vector sequences, denoted as the first input variable field vector and the second input variable field vector. Calculate the covariance and standard deviation of these two vectors. Divide the covariance of the two vectors by the product of their standard deviations to obtain the standardized linear correlation coefficient between the two variables. Perform this calculation for all pairwise combinations of variables, forming a square matrix structure with all fields as its dimensions, called the correlation coefficient matrix.

[0069] The visualization module uses the correlation coefficient matrix as input to create a two-dimensional heat map. Each pixel in the heat map represents the strength of the correlation between two variables. The image uses a continuous color scale to represent the magnitude of the correlation coefficient, ranging from negative correlation, no correlation, to strong positive correlation. In the heat map, the color depth directly reflects the strength of the relationship between the variables, assisting in analyzing which input variables have a more significant impact on the output variable. This map can be used to provide prior judgment for the subsequent selection and combination of input variable subsets.

[0070] The image is drawn using a hierarchical label diagonal display method to ensure that the order of variables in the figure is consistent with the structure of the correlation matrix, which facilitates manual verification of the correctness of the calculation process and the consistency of the image interpretation.

[0071] In the table data, each row represents a record of an emergency medical equipment transfer mission. Although the timestamp column has been removed, the order of the records remains the same as the original collection sequence. Based on the sequential structure of the data records, the entire dataset is divided into multiple subsets in chronological order. Each subset represents a complete set of transfer mission samples within a certain time span.

[0072] The tabular dataset is split into 15-minute intervals, dividing a day's data into segments. Each segment is a two-dimensional array with a fixed number of rows, containing both the complete input and output variable fields. Each sub-array is treated as a small sample block in the data structure and is subsequently fed into the autoencoder model as a "time segment data unit" for training.

[0073] All the resulting time-segment data subsets are unified into a two-dimensional array of consistent shape, ensuring that all subsets meet the dimensionality requirements of the neural network model input. Each subset contains the same number of sample entries, and the fields are arranged in the same order as the full table dataset. This operation ensures that the input dimensions of the subsequent model structure are fixed, which facilitates parameter convergence and stable weight updates during training.

[0074] The new generator loss integrates the original generator loss, the autoencoder reconstruction loss, and the mean squared error of the regression model, and is expressed as: Among them, X F , Y F , and They represent the generated input variables and output variables, the input variables reconstructed by AE, and the output variables predicted by the regression model respectively.

[0075] S3: Input the segmented real data into the autoencoder to reconstruct the real data, including:

[0076] Input the subset of real data segmented by time series into the pre-built autoencoder model for forward propagation. The encoder network encodes the input data to form the potential feature representation of the data.

[0077] The latent feature representation of the data is decoded and reconstructed through the decoder network to generate reconstructed data consistent with the dimension of the input data;

[0078] The generated reconstructed data is compared with the corresponding input data, the reconstruction error is calculated, and the reconstruction error is used to perform backpropagation optimization on the autoencoder model to form a trained autoencoder model.

[0079] Specifically, the autoencoder model consists of an encoder network and a decoder network. The encoder network's input is a two-dimensional data matrix arranged in time order. This data matrix consists of several consecutive time segments, each of which is represented in a two-dimensional structure as a set of sample rows and a set of field columns. All field columns correspond to the set of input variable fields.

[0080] The encoder network adopts a multi-layer feedforward structure, consisting of an input layer, several hidden layers, and a latent space output layer. The number of nodes in the input layer is equal to the number of fields in each time segment. The number of nodes in the hidden layer decreases with each layer to achieve feature compression. The activation function uses the rectified linear unit function, and the output of each layer is nonlinearly transformed before being passed to the next layer. The latent space layer outputs a low-dimensional vector representing the encoded representation of the time segment in the latent feature space.

[0081] Each time segment data subset is fed into the encoder network. During the forward propagation process, the network performs nonlinear transformations and dimensionality reduction on the high-dimensional input variable features, gradually removing redundant information between the original fields. Ultimately, a dimensionally compressed dense feature vector is formed in the latent space layer. This vector contains the global structural relationships and local behavioral patterns of the input variables in the current time segment, serving as the basis for the subsequent decoding process.

[0082] The decoder network structure is symmetrical to the encoder network. Starting with the latent space feature vector, it gradually restores the low-dimensional representation to the original input dimension through a multi-layer fully connected structure. Each layer uses a rectified linear unit function for nonlinear activation, and the final output layer produces a two-dimensional matrix with the same dimension as the input data. Each element in this reconstructed matrix represents the decoder's predicted estimate of the original input variable value under the current input.

[0083] To measure the fit between the reconstructed data and the original input variables, the reconstruction error is defined as the average of the sum of the squared differences between the two across all field dimensions. Specifically, for each input sample, the difference between its actual value and the reconstructed value in each field dimension is calculated. This difference is squared and then summed across all fields to obtain the reconstruction error for the current sample. The errors of all samples are then averaged to form the total reconstruction loss for the current batch.

[0084] The reconstruction loss is derived with respect to the weight parameters of each layer in the encoder and decoder using the backpropagation algorithm. After obtaining the gradient values, the weight parameters are iteratively updated using an optimizer. The optimizer is an adaptive moment estimation optimizer, with the initial learning rate set to a fixed value. The learning rate is scheduled using a cosine annealing mechanism to ensure rapid convergence in the early stages of training and stability in the later stages. After each parameter update, forward propagation and error calculation are repeated, and iterations are continued until the reconstruction loss converges.

[0085] When the reconstruction loss stabilizes within a low error range and no longer decreases significantly during training, the model is considered converged and the current model parameters are considered optimal. This structure and parameters are frozen, forming an autoencoder model that can be used in subsequent data generation assistance processes.

[0086] The completed autoencoder model has the following capabilities: it can effectively compress and accurately restore any set of structured tabular data in time segments, and express the complex relationships between input variables in the latent feature space, providing structural guidance for subsequent generators to generate high-dimensional data with consistent structure.

[0087] The loss of reconstructing the real data is expressed as: Among them, x i Input variables representing real data, Represents the input variables for the reconstruction data.

[0088] S4: Cross-validation scores when selecting machine learning models to make predictions on the dataset and performing 5-fold cross-validation on each machine learning model, including:

[0089] Select linear regression model, decision tree model, random forest model, lightweight gradient boosting model, support vector regression model and multilayer perceptron model as candidate machine learning models;

[0090] The complete table dataset that has been processed for missing values ​​and does not contain time information columns and redundant feature rows is used as training data, and each candidate machine learning model is trained separately;

[0091] Each candidate machine learning model adopts the five-fold cross-validation method during the training process, and the average value of the mean square error obtained by five cross-validations of each candidate machine learning model is used as the performance evaluation indicator. The machine learning model with the best prediction performance is determined based on the performance evaluation indicator.

[0092] Specifically, the linear regression model, decision tree model, random forest model, lightweight gradient boosting model, support vector regression model, and multi-layer perceptron model are set as the candidate machine learning model set. The basic structure and initial configuration of each model are as follows:

[0093] The linear regression model uses the least squares loss function, the goal of which is to minimize the sum of squared errors between the predicted value and the true value;

[0094] The decision tree model uses the minimization of the mean square error of the leaf nodes after splitting as the tree construction criterion and adopts greedy recursive partitioning to build the structure;

[0095] The random forest model integrates multiple independently trained decision trees and uses an average integration method to output the final prediction value;

[0096] The lightweight gradient boosting machine model is built on the gradient boosting framework and optimizes the overall residual distribution through multiple rounds of additive iterative tree models;

[0097] The support vector regression model constructs the optimal regression boundary in high-dimensional space and tolerates errors within a certain deviation range;

[0098] The multi-layer perceptron model adopts a fully connected feedforward neural network structure and uses nonlinear activation functions to model the complex mapping relationship between input and output.

[0099] The model completes the initial structure and default hyperparameters through the machine learning framework configuration. The input dimensions uniformly correspond to all input variable fields retained in the aforementioned complete table dataset, and the output dimensions are the single variable targets corresponding to the output variable fields.

[0100] A complete tabular dataset, after addressing missing values ​​and removing time columns and redundant fields, was used as the training data. The fields in this dataset were divided into a set of input variables and a set of output variables, forming the input-output pairs for the regression problem. The training dataset was then divided using a five-fold cross-validation approach, randomly dividing the dataset into five equal subsets. In each iteration, four of these subsets were selected as the training set for the current model, and the remaining subset was used as the validation set.

[0101] Five cross-validations were performed on each candidate machine learning model. In each cross-validation iteration, the model was fitted and optimized using only the training subset. The fitted model was then used to predict the input variable fields in the validation subset, yielding the predicted output for all samples in that subset.

[0102] For each validation subset, the error between the predicted output and the true output variable is calculated one by one. The error value uses the mean square error as the measurement indicator, and the calculation process is as follows:

[0103] The difference between the predicted value of each sample and the corresponding true output value is squared, and then the squared differences are averaged across all samples to obtain the mean squared error (MSE) for that fold. This process is repeated five times, one for each fold of the validation set. Finally, the average of the five mean squared errors is used as the overall performance evaluation metric for the current candidate model.

[0104] The five-fold mean squared error results of all candidate machine learning models are compared, and the model with the smallest mean squared error is selected as the regression model used to constrain the output variable structure during the tabular data generation process. This model will be used in conjunction with the generator in subsequent steps to design the loss function and provide regression guidance to ensure that the output structure of the generated data is consistent with that of the real data.

[0105] For example, in a set of actual test data, the lightweight gradient boosting machine model achieved the lowest five-fold mean square error when predicting the output variable of equipment transfer time, and was therefore selected as the regression model ultimately used to assist the generation process.

[0106] Choosing the optimal machine learning model involves:

[0107] The linear regression model is expressed as: y = β0 + β1x1 + β2x2 + ... + β n x n +∈; where y is the target variable, β0 is the intercept term, β1,β2,…,β n are characteristic coefficients, x1, x2,…, x n is the input feature, ∈ is the error term;

[0108] In order to optimize the model parameters, the least squares method is used to optimize the objective:

[0109] The decision tree model adopted, the mean square error is expressed as: Where N is the number of samples in the current node, y i is the true value of the i-th sample, is the predicted value of the i-th sample;

[0110] The splitting rule is to select features and split points that maximize the purity of child nodes and recursively generate a tree structure;

[0111] The random forest model adopted is expressed as: Where B is the total number of decision trees in the random forest, T b (x) is the predicted value of the b-th tree for sample x, is the final predicted value;

[0112] Ensemble multiple decision trees, each using randomly sampled data and features during training, and outputting the results in an average manner;

[0113] The lightweight gradient boosting machine model adopted has a loss function expressed as: Among them, F m-1 (x i ) is the cumulative prediction value of the first m-1 trees, f m (x i ) is the mth tree for sample x i The predicted value of leaf weight update can be expressed as: in, is the optimal weight of the jth leaf, I j The sample set belonging to the jth leaf, g i is the loss function F m-1 (x i )’s first-order gradient, h i is the loss function F m-1 (x i ) is the second-order gradient, λ is the L2 regularization coefficient;

[0114] The support vector regression model adopted is expressed as: The constraints are: Among them, ω is the weight vector, b is the bias term, φ(x i ) is the kernel function that takes the input feature x i Mapped to high-dimensional space, ∈ is the tolerance error, the maximum deviation allowed between the predicted value and the true value, ξ i , is a slack variable used to handle errors beyond ∈, C is a regularization parameter, balancing the model complexity (‖ω‖ 2 ) and training error

[0115] The multi-layer perceptron model adopted has the following forward propagation process: a (l) =σ(W (l) a (l-1) +b (l) ); the loss function is: Backpropagation of gradients: Among them, a (l) is the activation value of the lth layer, W (l) is the weight matrix of the lth layer, b (l) is the bias vector of the lth layer, σ is the ReLU activation function, δ (l) is the error term of the lth layer, a (l-1) is the activation value of the previous layer, which is used to calculate the gradient of the current layer weight;

[0116] The 5-fold cross-validation scores for each machine learning model are expressed as the mean squared error of multiple validations: Among them, n k represents the number of samples in the k-fold validation set, represents the true value of the i-th sample in the k-fold validation set, The model's predicted value for the i-th sample in the k-fold validation set.

[0117] The network training process includes the following steps:

[0118] Random noise is fed into the generator, and fake data is gradually generated through the upsampling operation of the generator network;

[0119] Use the generated fake data to input into the pre-trained autoencoder and regression model respectively, and optimize to form a new generator loss;

[0120] The preprocessed real data and the generated false data are input into the discriminator network, and a real value is finally obtained through network downsampling, and the result is judged as true or false.

[0121] The discriminator structure is a five-layer convolutional model, with inputs being real data and generated data. The Wasserstein-1 distance is used instead of the JS divergence to represent the distance between the real data distribution and the generated data distribution, and gradient penalty is used instead of weight clipping to address the problems of excessive training time and vanishing gradients. The discriminator loss can be expressed as:

[0122]

[0123] Among them, P r and P g Represent the real data distribution and the generated data distribution respectively, λ represents the gradient penalty coefficient, Represents the generated data sample, represents samples linearly interpolated from the true data x.

[0124] S5: Input the processed real data into the machine learning model with the best prediction performance in the dataset, and use it as a regression model to predict the real data, including:

[0125] The complete table data set that has been processed for missing values ​​and does not contain time information columns and redundant feature rows is divided into input variable data and output variable data, and both are input into the machine learning model with the best prediction performance;

[0126] The machine learning model with the best prediction performance takes the input variable data as input and obtains the predicted output variable data through forward calculation;

[0127] The error between the output variable data predicted by the machine learning model with the best prediction performance and the actual output variable data is calculated to obtain the prediction error;

[0128] The prediction error is used to reversely adjust the machine learning model with the best prediction performance to form a fully trained regression model.

[0129] Specifically, from the complete tabular dataset, all columns identified as input variable fields are extracted to form the input variable data subset. Simultaneously, all columns identified as output variable fields are extracted to form the output variable data subset. Each set of samples consists of an input variable sample vector and the corresponding output variable target value, forming a structurally consistent set of training samples. The two data subsets are ensured to be identical in sample size, sample order, and sample index numbering to facilitate subsequent model training and error calculation.

[0130] Subsets of the input variable data are sequentially fed into the determined optimal machine learning model. For example, the lightweight gradient boosting model consists of several base learner decision trees. Each tree independently processes the input sample during the forward prediction process and generates an intermediate prediction value. The intermediate prediction results of all trees are structurally weighted and accumulated to form the final predicted output value for each sample.

[0131] During the forward prediction process, the model automatically extracts the numerical features in the input variable sample vector and completes the regression calculation based on the structure and coefficients learned during training, thereby generating a set of output variable prediction values ​​to form the predicted output data set.

[0132] The predicted output dataset is compared element-by-element with the subset of output variable data. For each sample in the output variable field, the difference between the predicted value and the true value is calculated. This difference is then squared and averaged across all samples to obtain the mean squared error (MSE) for the entire training set.

[0133] The mean square error, as the main component of the loss function, comprehensively measures the prediction performance of the current model on the entire training set and provides an error signal basis for subsequent parameter adjustments.

[0134] Based on the calculated mean squared error, a model gradient path is constructed through the backpropagation mechanism to perform gradient calculations on the model's internal structural parameters. Taking the lightweight gradient boosting machine model as an example, this model uses a gradient boosting algorithm based on first- and second-order derivatives to adjust the split structure, split threshold, and leaf node weights of each subtree by minimizing the loss function.

[0135] In each iteration, a new subtree model is constructed based on the current residual distribution, and the optimal splitting strategy is determined by the gradient of the objective function. Regularization is used during training to limit model complexity and prevent overfitting. All model parameters are updated after each iteration to ensure that the predicted output is closer to the true output variable value.

[0136] After several rounds of training iterations, when the model's mean squared error converges below a set threshold, or if the error does not decrease sufficiently over multiple consecutive cycles, the model is considered to have reached optimal convergence, and the model parameters in the current state are fixed and saved. The resulting regression model has the following capabilities: Based on complete input variable information, it can accurately predict the corresponding output variable, with stable prediction errors and strong generalization capabilities.

[0137] The loss of predicting real data can be expressed as: where y i The output variable represents the real data, Output variable representing the predicted data.

[0138] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters and thresholds in the formulas are set by technicians in this field according to actual conditions.

[0139] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.

[0140] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0141] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0142] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0143] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, and may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of this embodiment according to actual needs.

[0144] In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.

[0145] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0146] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0147] Finally: The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for generating tabular data using an autoencoder and regression model-assisted GAN, characterized in that: The steps include: S1: Preprocess the missing values ​​of the original table data of emergency medical equipment transfer with input variables and output variables recorded by the equipment and remove the time column and feature row; S2: Calculate the correlation matrix for the preprocessed data, draw the correlation heat map, and segment the preprocessed tabular data according to time series; S3: Input the segmented real data into the autoencoder to reconstruct the real data; S4: Cross-validation score when selecting a machine learning model to predict the dataset and performing 5-fold cross-validation on each machine learning model; S5: Input the processed real data into the machine learning model with the best prediction performance in the dataset, and use it as a regression model to predict the real data.

2. The method for generating table data based on autoencoder and regression model assisted GAN according to claim 1, characterized in that: S1, specifically: The original table data of emergency medical equipment transfer with input variables and output variables recorded by the equipment is used as the data set to be processed; All entries with missing values ​​in the dataset to be processed are filled or deleted, and the columns recording time and irrelevant or redundant feature rows in the dataset to be processed are removed to obtain a complete table dataset that has been processed for missing values ​​and does not contain time information columns and redundant feature rows.

3. The method for generating table data based on autoencoder and regression model assisted GAN according to claim 2, characterized in that: S2, specifically: Based on a complete table data set that has been processed for missing values ​​and does not contain time information columns and redundant feature rows, the correlation between each input variable and between the input variables and the output variables in the table data set is calculated to obtain the correlation coefficient matrix between the variables; According to the correlation coefficient matrix between variables, a correlation heat map is drawn in the form of a matrix heat map; According to the time series of data collection, the complete table data set that has been processed for missing values ​​and does not contain time information columns and redundant feature rows is segmented to obtain the real data subset segmented by time series.

4. The method for generating table data based on autoencoder and regression model assisted GAN according to claim 3, characterized in that: S3, specifically: Input the subset of real data segmented by time series into the pre-built autoencoder model for forward propagation. The encoder network encodes the input data to form the potential feature representation of the data. The latent feature representation of the data is decoded and reconstructed through the decoder network to generate reconstructed data consistent with the dimension of the input data; The generated reconstructed data is compared with the corresponding input data, the reconstruction error is calculated, and the reconstruction error is used to perform backpropagation optimization on the autoencoder model to form a trained autoencoder model.

5. The method for generating table data based on autoencoder and regression model assisted GAN according to claim 4, characterized in that: S4, specifically: Select linear regression model, decision tree model, random forest model, lightweight gradient boosting model, support vector regression model and multilayer perceptron model as candidate machine learning models; The complete table dataset that has been processed for missing values ​​and does not contain time information columns and redundant feature rows is used as training data, and each candidate machine learning model is trained separately; Each candidate machine learning model adopts the five-fold cross-validation method during the training process, and the average value of the mean square error obtained by five cross-validations of each candidate machine learning model is used as the performance evaluation indicator. The machine learning model with the best prediction performance is determined based on the performance evaluation indicator.

6. The method for generating table data based on autoencoder and regression model assisted GAN according to claim 5, characterized in that: S5, specifically: The complete table data set that has been processed for missing values ​​and does not contain time information columns and redundant feature rows is divided into input variable data and output variable data, and both are input into the machine learning model with the best prediction performance; The machine learning model with the best prediction performance takes the input variable data as input and obtains the predicted output variable data through forward calculation; The error between the output variable data predicted by the machine learning model with the best prediction performance and the actual output variable data is calculated to obtain the prediction error; The prediction error is used to reversely adjust the machine learning model with the best prediction performance to form a fully trained regression model.