# How to fine tune the LSTM

The image below is a comparison between the actual data and the predicted data for a test data set. What I am unable to achieve is the way the the actual data fluctuates over a larger span. The LSTM model outputs a trajectory which only oscillates in a smaller span. Can anyone tell why this happens. Please ignore the label. The actual plot is of how the temperature in a room varies when a cooler is switched on/off. I am learning it as a sequence prediction problem where I use previous two time step inputs(which include the temperature and other factors like thermostat control actions etc) to learn the next output for the temperature.

• Please post the definition of the network and the fit procedure. It can be related to your loss, regularization, or activations – tRosenflanz Jul 26 '18 at 16:45

Just by looking at your graph, and as you also said, LSTM model is able to handle variations in mid ranges but is failing at capturing variations in edges. But in this scenario, I would have made my model more complex in the following way.