Predicting time series, with few historical samples based on similar series I'm trying to build a model with Keras to predict the time series of a sensor, based on its type and historic data of sensors of the same type. 

The figure below shows 3 time series, generated from 3 sensors of the same type, the green dashed line is the new sensor data and the vertical line is where the data for the new sensor end.



I've tried writing an LSTM network, that returns the hidden state output for each input time step, while the target was the values for each timestamp. Then trying to predict the new time series giving the model a few points of the sensor history data. With no luck :(

So I'm guessing I'm walking on the wrong path. What are the options of predicting a time series with just a few historical samples based on the history of other time series of the same type?

Any help / reference / video would be appericiated
I'd suggest statistical forecasting techniques such as ARIMA or ES, but those models usually cannot generalize well across timeseries, so you'd need one for each timeseries

A good starter for using LSTM for forecasting is here - https://www.tensorflow.org/tutorials/structured_data/time_series. But if you don't have enough data, NNs would like result in poor test results.

For your case, I'd suggest you trying a regression approach- structuring your timeseries into a regression features format. After that you can use regression models from sklearn, starting with linear and moving to more complex ones. Because you have less data, you might want to explore less complex models first to prevent overfitting. For the features, for example, you could create lag features (what was the value of your signal two timestep back, what was the mean/std of the past 2 timesteps, what was the maximum in the last 6 timesteps and so on). Look up any kaggle competition on timeseries forecasting if you want to refer code or get specific ideas on feature extraction