This commit is contained in:
Yevhenii Poliakov 2023-05-14 22:10:00 +02:00
parent 2533663657
commit 56cfff9e5b

View File

@ -49,6 +49,14 @@ y_train_updated = pd.Series(y_train_updated[:len(X_train)])
# Update the 'y_train' array with the modified values # Update the 'y_train' array with the modified values
y_train.loc[X_train.index] = y_train_updated y_train.loc[X_train.index] = y_train_updated
# Fill NaN values with the mean of non-missing values
y_train.fillna(y_train.mean(), inplace=True)
# Convert the 'y_train' series to a NumPy array
y_train = y_train.values
# Create the neural network model # Create the neural network model
model = Sequential() model = Sequential()
model.add(Dense(32, activation='relu', input_dim=X.shape[1])) model.add(Dense(32, activation='relu', input_dim=X.shape[1]))