Seaborn temperature forecasting

I’m looking at the seaborn temp forecasting. With the modeling, it shifts the time in the past by the future target so you can see the accuracy of the model. I have the model trained and want to pass new data for a prediction but it always forecasts from future target in the past. I have 32 new observations. How do I get it to give me a forecast from now, rather than 6 days ago?

What do I need to do to pass new observations to the model to get current predictions rather than predictions from 6 days ago?

Thanks in advance

I think its coming from multivariate_data:

=====================
def multivariate_data(dataset, target, start_index, end_index, history_size,
target_size, step, single_step=False):
data = []
labels = []

  start_index = start_index + history_size
  if end_index is None:
    end_index = len(dataset) - target_size

  for i in range(start_index, end_index):
    indices = range(i-history_size, i, step)
    data.append(dataset[indices])

    if single_step:
      labels.append(target[i+target_size])
    else:
      labels.append(target[i:i+target_size])

  return np.array(data), np.array(labels)

===============================

features_considered = [‘p (mbar)’, ‘T (degC)’, ‘rho (g/m**3)’]
features = df[features_considered]
features.index = df[‘Date Time’]
features.head()

features.plot(subplots=True)

dataset = features.values
dataset

data_mean = dataset[:TRAIN_SPLIT].mean(axis=0)
data_std = dataset[:TRAIN_SPLIT].std(axis=0)

dataset = (dataset-data_mean)/data_std

def multivariate_data(dataset, target, start_index, end_index, history_size,
                      target_size, step, single_step=False):
  data = []
  labels = []

  start_index = start_index + history_size
  if end_index is None:
    end_index = len(dataset) - target_size

  for i in range(start_index, end_index):
    indices = range(i-history_size, i, step)
    data.append(dataset[indices])

    if single_step:
      labels.append(target[i+target_size])
    else:
      labels.append(target[i:i+target_size])

  return np.array(data), np.array(labels)

#past_history = 720
#future_target = 72
#STEP = 6
#past_history = 64
past_history = 32
future_target = 6
STEP = 1

Having Same Issue.

Hi Kimia,
I was importing known size data so I just set the start index to be len of my dataset - future_target. I think part of it was the defined variables might have been lost in translation between different users as history_size and target_size are not defined variables. I assume they meant past_history and future_target, but it was never throwing errors.

Hi Kimia,
That was not it. I am still off by multiple steps. Is there anyone who can explain how to train the model without going back future_target steps? I was using past history of 32, but it is still predicting from 6 days in the past.