<jupyter_start><jupyter_text>ANN<jupyter_code>import tensorflow as tf
model= tf.keras.models.Sequential()
model.add(tf.keras.layers.Dense(units=200,activation='relu',input_shape= (33,)))
model.add(tf.keras.layers.Dense(units=200,activation='relu'))
model.add(tf.keras.layers.Dense(units=1,activation='sigmoid'))
model.summary()<jupyter_output>_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
dense (Dense)                (None, 200)               6800      
_________________________________________________________________
dense_1 (Dense)              (None, 200)               40200     
_________________________________________________________________
dense_2 (Dense)              (None, 1)                 201       
=================================================================
Total params: 47,201
Trainable params: 47,201
Non-trainable params: 0
_________________________________________________________________<jupyter_text>After Outlier<jupyter_code>from sklearn import metrics
model.compile(optimizer='adam',loss='binary_crossentropy',metrics=['accuracy'])

epochs_hist = model.fit(x_train,y_train,epochs=50,batch_size=20)
model.metrics_names
y_pred=model.predict(x_test)

y_pred = (y_pred>0.5)

plt.plot(epochs_hist.history['loss'])
plt.plot(epochs_hist.history['acc'])
plt.xlabel('Epochs')
plt.ylabel('percentage')
plt.legend(['loss','accuracy'])
plt.title('Loss and Accuracy plot')
from sklearn.metrics import confusion_matrix,classification_report
cm = confusion_matrix(y_test,y_pred)
sns.heatmap(cm,annot=True)
print(classification_report(y_test,y_pred))<jupyter_output>precision    recall  f1-score   support

         0.0       0.97      0.97      0.97       237
         1.0       0.57      0.53      0.55        15

    accuracy                           0.95       252
   macro avg       0.77      0.75      0.76       252
weighted avg       0.95      0.95      0.95       252<jupyter_text>After Oversampling<jupyter_code>model.compile(optimizer='adam',loss='binary_crossentropy',metrics=['accuracy'])

epochs_hist = model.fit(x_train_s,y_train_s,epochs=50,batch_size=20)
y_pred=model.predict(x_test)

y_pred = (y_pred>0.5)

plt.plot(epochs_hist.history['loss'])
plt.plot(epochs_hist.history['acc'])
plt.xlabel('Epochs')
plt.ylabel('percentage')
plt.legend(['loss','accuracy'])
plt.title('Loss and Accuracy plot')
from sklearn.metrics import confusion_matrix,classification_report
cm = confusion_matrix(y_test,y_pred)
sns.heatmap(cm,annot=True)

print(classification_report(y_test,y_pred))<jupyter_output>precision    recall  f1-score   support

         0.0       0.97      0.97      0.97       237
         1.0       0.53      0.60      0.56        15

    accuracy                           0.94       252
   macro avg       0.75      0.78      0.77       252
weighted avg       0.95      0.94      0.95       252
{'fraction_non_alphanumeric': 0.14782608695652175, 'fraction_numerical': 0.05652173913043478, 'mean_word_length': 3.353711790393013, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '11345', 'license': 'MIT', 'n_tokens_mistral': 1043, 'n_tokens_neox': 924, 'n_words': 148, 'path': 'Cervical_with_ADAYSN_and_Isolation_Forest.ipynb', 'repo_name': 'moinul7002/Analysis-of-ML-Techniques-in-Classifying-Cervical-Cancer-using-Isolation-Forest-with-ADASYN', 'size': '2990'}