I have two input arrays that include both historical and forecasted data, and one input array that is only historical. I'm trying to predict (or "forecast") the latter array given the forecasts of the first two arrays.


  • Rainfall (historical and forecast)
  • Air temp (historical and forecast)
  • Water volume (historical)

Training target:

  • Water volume (historical)

Desired model output:

  • Water volume (forecast)

I'm still a bit of a noob, and lost as to how this would work. None of the examples I've found take the target's previous state as input. The crux of the problem is that I could do a vanilla multivariate LSTM with only rainfall and air temp as inputs, but it would not take into account the starting condition of water in the container.

  • $\begingroup$ Is this for some kind of hydrologic modeling and analysis? Having past water volume as an input along with past air temp & past rainfall should be just fine since the desired output is forecast (future) water volume. $\endgroup$
    – C8H10N4O2
    Oct 5, 2020 at 16:13
  • $\begingroup$ That is true, but I want the forecasted rainfall and air temp to affect the water volume prediction. $\endgroup$ Oct 5, 2020 at 16:58

1 Answer 1


Doing some further searching, I found a nice post by Jason Brownlee that has helped me better understand the problem and one potential solution:

a multi-input model with an LSTM input for the historical data and a vector input for expected conditions.

Furthermore, Keras' Functional API (https://keras.io/guides/functional_api/) will help me build such a model.

  • $\begingroup$ Did this work eventually? $\endgroup$ Jun 29, 2023 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.