base model
n_cols = predictors.shape[1]
#define regression model
def regression_model():
# create model
model = Sequential()
keras.Input(shape=n_cols),
model.add(Dense(10, activation='relu', input_shape=(n_cols,)))
model.add(Dense(1))
# compile model
model.compile(optimizer='adam', loss='mean_squared_error')
return model
Not Normalized Data 50 epochs: mean of the mean squared errors 113.5717961653606 , standard deviation of the mean squared errors 7.981737232467379
Normalized Data 50 epochs : mean of the mean squared errors 68.661383185501 , standard deviation of the mean squared errors 67.22954921882359
Normalized Data 100 epochs : mean of the mean squared errors 39.42437554208319 , standard deviation of the mean squared errors 3.9368579548374756
Normalized Data 100 epochs 3 hidden layers : mean of the mean squared errors 39.42437554208319 , standard deviation of the mean squared errors 3.9368579548374756
Model without keras.Input(shape=n_cols):
Not Normalized Data 50 epochs: mean of the mean squared errors 57.4898422746333 , standard deviation of the mean squared errors 12.806186415681317
Normalized Data 50 epochs : mean of the mean squared errors 66.64348721598294 , standard deviation of the mean squared errors 63.73042848699867
Normalized Data 100 epochs : mean of the mean squared errors 31.756936487379647 , standard deviation of the mean squared errors 2.5010805172562036
Normalized Data 100 epochs 3 hidden layers : mean of the mean squared errors 31.756936487379647 , standard deviation of the mean squared errors 2.5010805172562036
why results are better without input layer?