I copied the code (including build_models method) of neural networks to my kaggle with the same data. But every time i run it, i get random mse results. Why is that?
def build_models():
tf.random.set_seed(20)
model_1 = Sequential(
[
Dense(25, activation = 'relu'),
Dense(15, activation = 'relu'),
Dense(1, activation = 'linear')
],
name='model_1'
)
model_2 = Sequential(
[
Dense(20, activation = 'relu'),
Dense(12, activation = 'relu'),
Dense(12, activation = 'relu'),
Dense(20, activation = 'relu'),
Dense(1, activation = 'linear')
],
name='model_2'
)
model_3 = Sequential(
[
Dense(32, activation = 'relu'),
Dense(16, activation = 'relu'),
Dense(8, activation = 'relu'),
Dense(4, activation = 'relu'),
Dense(12, activation = 'relu'),
Dense(1, activation = 'linear')
],
name='model_3'
)
model_list = [model_1, model_2, model_3]
return model_list
RESULTS:
Model 1: Training MSE: 406.19, CV MSE: 551.78
Model 2: Training MSE: 73.40, CV MSE: 112.33
Model 3: Training MSE: 406.19, CV MSE: 551.78
RESULTS:
Model 1: Training MSE: 406.19, CV MSE: 551.78
Model 2: Training MSE: 73.78, CV MSE: 117.64
Model 3: Training MSE: 73.40, CV MSE: 112.29