text_html_output_1.png
from sklearn.preprocessing import RobustScaler

from tensorflow.keras.callbacks import EarlyStopping

from tensorflow.keras.layers import Dense, Dropout

from tensorflow.keras.models import Sequential

scaler = RobustScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.transform(X_test)

early_stop = EarlyStopping(monitor='val_loss', mode='min', verbose=1, patience=25)
model = Sequential()
model.add(Dense(17, activation='relu'))
model.add(Dropout(0.2))
model.add(Dense(9, activation='relu'))
model.add(Dropout(0.2))
model.add(Dense(7, activation='softmax'))
model.compile(loss='categorical_crossentropy', optimizer='adam')
model.fit(x=X_train, y=y_train, epochs=600, batch_size=32, validation_data=(X_test, y_test), callbacks=[early_stop])