'Normalizing data in python in Keras Linear regression Neural Network
I am developing the Neural Network model for linear regression using Keras in Python. I have divided my master dataframe in two parts. (1) Features and (2) Targets
then by using below code, I have made splits of my features and targets into train and test sets.
from sklearn.model_selection import train_test_split
x = df_200[features]
y = df_200[targets]
x_train, x_test, y_train, y_test = train_test_split(x,y, random_state = 1, test_size = 0.2)
But my dataset is having wide ranges of numbers. For which I am thinking to normalize the data to minimize the loss. I would like to ask you that, how would I normalize the data? and Should I normalize the whole dataset ( features and inputs) or only training dataset (x_train and y_tain)??
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
