I have several different datasets (csv files) and I'd like to perform optimization of the same LSTM model by calling optim.minimize() inside a loop for each and every one of the datasets. Is it possible to do this using the same data() function and choose a new dataset in each of the iterations? I could use different data() functions for every dataset and pass them as parameter to optim.minimize() function accordingly, although it doesn't seem the best way to do such a task. Another option would pass arguments to data() through optim.minimize() but it seems this is not possible. Any suggestions?
I have several different datasets (csv files) and I'd like to perform optimization of the same LSTM model by calling optim.minimize() inside a loop for each and every one of the datasets. Is it possible to do this using the same data() function and choose a new dataset in each of the iterations? I could use different data() functions for every dataset and pass them as parameter to optim.minimize() function accordingly, although it doesn't seem the best way to do such a task. Another option would pass arguments to data() through optim.minimize() but it seems this is not possible. Any suggestions?
Thanks in advance.
def data: if dataset == 1:
load dataset 1
if name == "main": for dataset in range(1, 3): #iterations best_run, best_model = optim.minimize(model=create_model, data=data, algo=tpe.suggest, max_evals=10, trials=Trials(), arguments = [dataset])