I'm trying to train an AutoNHITS and AutoRNN. But ...
# neural-forecast
l
I'm trying to train an AutoNHITS and AutoRNN. But I got this error on the .fit: def config_nhits(trial): return { "max_steps": 50, #1000 # Number of SGD steps "input_size": 26, # Size of input window (lags) "learning_rate": trial.suggest_loguniform("learning_rate", 1e-3, 1e-1), # Initial Learning rate #"n_pool_kernel_size": trial.suggest_categorical("n_pool_kernel_size", [[2, 2, 2], [16, 8, 1]]), # MaxPool's Kernelsize #"n_freq_downsample": trial.suggest_categorical("n_freq_downsample", [[168, 24, 1], [24, 12, 1], [1, 1, 1]]), # Interpolation expressivity ratios "val_check_steps": 52, # Compute validation every 50 steps #"random_seed": 5, "scaler_type": trial.suggest_categorical("scaler_type", ['standard', 'robust']), 'stat_exog_list': static_list, # Static exogenous variables 'futr_exog_list' : future_list, # Future exogenous variables 'activation' : trial.suggest_categorical("activation", ['ReLU', 'LeakyReLU']) #"random_seed": tune.randint(1, 10), #"reconciliation": tune.choice(['BottomUp', 'MinTraceOLS', 'MinTraceWLS']) } def config_rnn(trial): return { "max_steps": 50, #1000 # Number of SGD steps "input_size": 26, # Size of input window (lags) "learning_rate": trial.suggest_loguniform("learning_rate", 1e-3, 1e-1), # Initial Learning rate #"n_pool_kernel_size": trial.suggest_categorical("n_pool_kernel_size", [[2, 2, 2], [16, 8, 1]]), # MaxPool's Kernelsize #"n_freq_downsample": trial.suggest_categorical("n_freq_downsample", [[168, 24, 1], [24, 12, 1], [1, 1, 1]]), # Interpolation expressivity ratios "val_check_steps": 52, # Compute validation every 50 steps #"random_seed": 5, "scaler_type": trial.suggest_categorical("scaler_type", ['standard', 'robust']), 'stat_exog_list': static_list, # Static exogenous variables 'futr_exog_list' : future_list, # Future exogenous variables #'encoder_activation' : trial.suggest_categorical("encoder_activation", ['relu', 'tanh']) #"random_seed": tune.randint(1, 10), #"reconciliation": tune.choice(['BottomUp', 'MinTraceOLS', 'MinTraceWLS']) } models = [AutoNHITS(h=horizon, config=config_nhits, search_alg=optuna.samplers.TPESampler(), backend='optuna', num_samples = 5), AutoRNN(h=horizon, config=config_rnn, search_alg=optuna.samplers.TPESampler(), backend='optuna', num_samples = 5 )] nf = NeuralForecast( models=models, freq='W-SUN') nf.fit(df_1, static_df=static_df)
j
Hey. What is the minimum size of your series?