I have trained an ANN Binary classifier using Keras. It gives 90% accuracy. After testing when I predict same data again but pass only one class then accuracy decreases to 40%. I have figured out that if I pass mixed classes while predicting then it will give me around 90% accuracy and if I pass data points of only one class then accuracy decreases .As I increase the data points of other class as well then accuracy increases. Long in short. CASE 1: 100 samples from class 0, 100 sample from class 1, on predicting using trained model Accuracy = 90%

CASE 2: Same 100 samples from class 0 passes to same trained Models give me 40% accuracy. Why accuracy changes ?

EDIT: I'm performing Standardization before predicting every time which effects the predictions. How to handle this case? Any suggestions would be much appreciated. Thanks


1 Answer 1


This problem is solved if we use same Mean and Standard Deviation which used for standardization of training samples.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.