# Do I have to scale/normalize my training data for LSTM Classification, even if I only have one feature?

I have a time-series data as follows:

# Time, Bitrate, Class
0.2,  312,     1
0.3,  319      1
0.5,  227      0
0.6,  229      0
0.7,  219      0
0.8,  341      1
1.0,  401      2


I am using only the "Bitrate" column as a feature, and "Class" for the labels for an LSTM classification model. In case of multiple features, I need to scale my data of course, to prevent domination from one feature to another. However, in my case, do I still need to scale/normalize my data, considering there is only one feature? Thanks!

## 1 Answer

Normalizing the features ensures that they take on reasonable values say between -3 and +3. This ensures that you don't run into a numeric overflow or under flow issues in your network. For e.g. just see what value np.exp(312) or np.exp(-312) takes on.

where, 312 is a value of the bitrate in your observation.

Certain activation functions such as the sigmoid might run into numerical precision issues if your data is not normalized. So, in this case it doesn't matter if your data contains only 1 feature.

• This makes sense. Thanks Jayaram! – bbasaran May 2 at 19:41