I'm developing a GAN model to generate synthetic energy timeseries data, based in this code https://git.opendfki.de/koochali/forgan/-/blob/master/lorenz_example.ipynb I'm beginner at GAN and a little bit confused about the data preparation. For GRU and LSTM models, I used to turn the data into lags (sequenaces) before passing it to the models. for example: the input ship will be:
sequance_lendth = 25
prediction_length = 3
input_features = 2
X_train = (batch_size, sequance_length, input_features)
y_train = (batch_size, prediction_length)
am I supposed to do the same in this case with GAN model ? The other wondering, in case I have multivariate time series (Price, stock index ...) and I want only to generate the price. Should I pass all features to the model?
This what I have done, but I'm not sure if this is reasonable or not.
class Generator(nn.Module):
def __init__(self, input_features, output_dim, noise_size, x_batch_size, generator_latent_size):
super().__init__()
self.noise_size = noise_size
self.x_batch_size = x_batch_size
self.generator_latent_size = generator_latent_size
self.cond_to_latent = nn.GRU(input_size=input_features,
hidden_size=generator_latent_size)
self.model = nn.Sequential(
nn.Linear(in_features=generator_latent_size + noise_size,
out_features=generator_latent_size + noise_size),
nn.ReLU(),
nn.Linear(in_features=generator_latent_size + noise_size, out_features=prediction_length)
)