...

/

Restricted Stateless LSTM Network for Baseline Modeling

Restricted Stateless LSTM Network for Baseline Modeling

Learn to build and analyze a restricted stateless LSTM network as your baseline model for time series analysis.

It’s always advisable to begin with a baseline model. A restricted stateless LSTM network is taken as a baseline. In such a network, every LSTM layer is stateless, and the final layer has a restricted output, that is:

LSTM(..., stateful=False, return_sequences=False)

We’ll now proceed to build the baseline model, outlining each step in the process.

Input layer

The input layer in LSTM expects three-dimensional inputs. The input shape should be:

(batch size, time-steps, features)\textit{(batch size, time-steps, features)}

A stateless LSTM doesn’t require to specify the batch size explicitly. Therefore, the input shape is defined as follows in the code below.

Press + to interact
model = Sequential ()
model.add(Input(shape=(TIMESTEPS , N_FEATURES),
name='input'))

The above code will show Succeeded, which means the input layer has been created.

The input shape can ...