<jupyter_start><jupyter_text>NEURAL-NETWORKS (KERAS)<jupyter_code>from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
X_train = sc.fit_transform(X_train)
X_test = sc.fit_transform(test)


import keras
from keras.models import Sequential
from keras.layers import Dense
model = Sequential()

# Input layer with 5 neurons
model.add(Dense(3, activation = 'relu', input_dim = 5))
#Hidden layer
model.add(Dense(2, activation = 'relu'))
#output layer with 1 output neuron which will predict 1 or 0
model.add(Dense(1, activation = 'sigmoid'))
model.compile(optimizer= 'adam', loss= 'binary_crossentropy', metrics= ['accuracy'])
model.fit(X_train, y_train, batch_size = 10, epoch = 100)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1184573002754821, 'fraction_numerical': 0.01790633608815427, 'mean_word_length': 7.0777777777777775, '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': '167457', 'license': 'MIT', 'n_tokens_mistral': 266, 'n_tokens_neox': 248, 'n_words': 65, 'path': 'Machine Learning and Data Science/Titanic_Survival_Prediction/.ipynb_checkpoints/Titanic_neu_net_keras-checkpoint.ipynb', 'repo_name': 'Brabec/Hacktoberfest2020', 'size': '726'}