1
$\begingroup$

I built a MLP for classification problem. I used KDD99 dataset. but the problem is that when I run it it gives ech time a different value of accuracy. Is this logic? I mean could the same model for the same data gives each time a different value of accuracy? if so why?

$\endgroup$
5
  • $\begingroup$ Depending on initialization of weights and the cost function, your model can get to different local minima, thereby giving different values of accuracy. $\endgroup$
    – Ankit Seth
    Aug 13 '18 at 13:00
  • $\begingroup$ so how to fix it $\endgroup$
    – user
    Aug 13 '18 at 13:12
  • $\begingroup$ sometimes it gives 0.99 and sometimes it gives 0.19 . $\endgroup$
    – user
    Aug 13 '18 at 13:13
  • $\begingroup$ I used keras cntk. and I used categorical crossentropy $\endgroup$
    – user
    Aug 13 '18 at 13:15
  • $\begingroup$ You can go to the documentation and check if you can change the initialization or not. I don't know about keras that much but in other ML models, a random_state option is present so that you get same results everytime for same data and model. $\endgroup$
    – Ankit Seth
    Aug 13 '18 at 13:26
1
$\begingroup$

I assume by "run" you mean training run. Different training runs can have different performances due to many factors:

  • Different random initialization.
  • Different data sampling because of stochastic gradient descent (SGD).
  • Stopping in different local minima.
  • Stopping training before asymptotic performance.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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