# All classification models except neural network giving 100% accuracy

I have a dataset of size (140,000, 10) containing 1 dependent variable. I used MinMax scaler on independent variables. For the target value, there is a class imbalance of 94% 0's and 6% 1's. Used RandomOverSampler for oversampling.

When I run a neural network model on my dataset, it gives me the following plot:

With a testing accuracy of 96.34%

This is my neural network:

model = models.Sequential()
activation='relu', input_shape=(10,)))
activation='relu'))
activation='relu'))

model.compile(loss='binary_crossentropy',

history = model.fit(X_over, y_over, epochs=25, batch_size=100, validation_split=0.2, shuffle=True, verbose=1)


I have added regularizers to input and hidden layers to prevent overfitting.

On using a Random Forest Classifier and SVM, I get 100% accuracies for training as well as testing. Is something wrong with my data? How do I solve this?

It could be due to a lack of initialization of your neurons.

Did you initialize them randomly?

For instance:

from tensorflow.keras import layers
from tensorflow.keras import initializers