<jupyter_start><jupyter_text>***********************************************************<jupyter_code>from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, LSTM

model_rnn = Sequential()
model_rnn.add(LSTM(128, input_shape=(X_train.shape[1:]), activation='relu', return_sequences=True))
model_rnn.add(BatchNormalization())
model_rnn.add(Dropout(0.2))

model_rnn.add(LSTM(128, activation='relu'))
model_rnn.add(BatchNormalization())
model_rnn.add(Dropout(0.1))

model_rnn.add(Dense(32, activation='relu'))
model_rnn.add(BatchNormalization())
model_rnn.add(Dropout(0.2))

model_rnn.add(Dense(1, activation='relu'))
model_rnn.compile(optimizer=Adam(0.001),
                loss='binary_crossentropy',
                metrics=['accuracy', 'AUC', 'Recall', 'Precision'])
mod_rnn_fitted = model_rnn.fit(X_train, y_train, epochs=6, 
                    validation_data=(X_test, y_test))
history_model_rnn = model_rnn.fit(X_train, Y_train, validation_split=0.2, epochs=15, batch_size=32)
np.mean(history_model_rnn.history['accuracy'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1952770208900999, 'fraction_numerical': 0.02452316076294278, 'mean_word_length': 7.348484848484849, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '302882', 'license': 'Apache-2.0', 'n_tokens_mistral': 420, 'n_tokens_neox': 397, 'n_words': 47, 'path': 'Data P/DL_epilepsy.ipynb', 'repo_name': 'mohamedba01/EPilepsy_EEG', 'size': '1101'}