You are here

Kaggle Digit Recognizer - Neural Network always predicting same class

Hey,

I'm trying to use encog to create a neural networks solution to the Kaggle Digit Recognizer problem (http://www.kaggle.com/c/digit-recognizer) but have made a mistake somewhere which is resulting in the same value being predicted regardless of the input.

The code is here -> https://github.com/jennifersmith/machinenursery/blob/master/src/main/jav...

My current creation of the network is slightly different to the code on there because I've been playing around with the number of neurons to have in the hidden layer to see what difference it makes.

It currently has the following number of neurons on each layer:

784 -> 100 -> 10

I tried printing out the inputs and the predictions being made for each digit which looks like this:

Input: [...]
Output: -0.9968993396729374 0.9999994720910915 -0.7363881866246577 0.12479306360976619 0.2689649940318884 -0.2750500012644022 -0.6293756510348953 0.17913701390942288 0.9999999999629776 0.2712754057622542
Actual: 7.0, Prediction: 8.0

Input: [...]
Output: -0.9968993396729374 0.9999994720910915 -0.7363881866246577 0.12479306360976619 0.2689649940318884 -0.2750500012644022 -0.6293756510348953 0.17913701390942288 0.9999999999629776 0.2712754057622542
Actual: 6.0, Prediction: 8.0

Input: [...]
Output: -0.9968993396729374 0.9999994720910915 -0.7363881866246577 0.12479306360976619 0.2689649940318884 -0.2750500012644022 -0.6293756510348953 0.17913701390942288 0.9999999999629776 0.2712754057622542
Actual: 9.0, Prediction: 8.0

My current thinking is that perhaps this is happening because a lot of the inputs have a value of 0 but I'm not sure what I need to do to get around this so any advice would be awesome.

Thanks, Mark

Neural Network Forums: 
maria's picture

Hi,

I have the same problem, did anybody come up with what was causing it?
Thank you very much

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer