<jupyter_start><jupyter_text>using kfold<jupyter_code>from sklearn.model_selection import train_test_split,KFold,cross_val_score
from keras.models import Sequential
from keras.layers import Activation, Dense,Flatten,LSTM,Dropout
kfold=KFold(5,True,5)
cvscores = []
for train, test in kfold.split(X):
  X_train=X[train]
  y_train=Y[train]
  X_test=X[test]
  y_test=Y[test]
  
  classifier = Sequential()

# Build the input and hidden layers with dropout
  classifier.add(Dense(units = 200, activation = 'relu', kernel_initializer = 'uniform', input_dim = 14))
  classifier.add(Dropout(rate = 0.1))

# Adding the second hidden layer
  classifier.add(Dense(units = 200, activation = 'relu', kernel_initializer = 'uniform'))
  classifier.add(Dropout(rate = 0.1))

# Adding the third hidden layer
  classifier.add(Dense(units = 200, activation = 'relu', kernel_initializer = 'uniform'))
  classifier.add(Dropout(rate = 0.1))

# Adding an output layer
  classifier.add(Dense(units = 1, kernel_initializer = 'uniform', activation = 'sigmoid'))

  model.compile(loss='mse', optimizer='adam',metrics =["mse"])
  model.fit(x_train, y_train, epochs=15, batch_size=64, verbose=0,shuffle=False)
  
  scores = model.evaluate(x_test,y_test,verbose=0)
  print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))
  cvscores.append(scores[1] * 100)
print("%.2f%% (+/- %.2f%%)" % (np.mean(cvscores), np.std(cvscores)))<jupyter_output>mse: 11.18%
mse: 11.25%
mse: 11.21%
mse: 11.20%
mse: 11.20%
11.21% (+/- 0.03%)
{'fraction_non_alphanumeric': 0.16032064128256512, 'fraction_numerical': 0.04342017368069472, 'mean_word_length': 5.778280542986425, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '637511', 'license': 'MIT', 'n_tokens_mistral': 626, 'n_tokens_neox': 569, 'n_words': 112, 'path': 'neural_twitter.ipynb', 'repo_name': 'RanjanRavi2398/social-Circus', 'size': '1497'}