Football prediction program encog: Inconsistent predictions

Viewed 2591

I am making a program that predicts outcome of a football match using encog. I have created a neural network, trained it with data of 90 matches with resilient propagation training method. I have marked results of match as 1 for home win, 0 for draw and -1 for away win.

Problem is in prediction. Sometimes i get sucess rate of 50% and other time i get as low as 33%. It is like using random function. What i have noticed is that almost alwayst the most predicted outcome is 1(around 70%). I have tried changing the number of hidden layers, number of training but with no luck, it is still oscillating.Can anyone please help me or pint me into right direction if i am doing something wrong.

Here is the code for neural network. I am getting training data, and prediction data from database.

Predictor(NeuralDataSet trainingData){
    trainingSet = trainingData;
    network = new BasicNetwork();
    network.addLayer(new BasicLayer(16));
    network.addLayer(new BasicLayer(3));
    network.addLayer(new BasicLayer(1));
    network.getStructure().finalizeStructure();
    network.reset();
}

Training

public void train(int epoch){
    int i =0;
    final Train train =new ResilientPropagation(network,trainingSet);
    while(i<=epoch){
        train.iteration();
        i++;
    }

}

Predicting

public void successRate(NeuralDataSet trainingData){
    int counter = 0;
    int correct = 0;
    int home=0;
    int away=0;
    int draw=0;
    for(MLDataPair pair: trainingData ) {
        final MLData output = network.compute(pair.getInput());
        if(pair.getIdeal().getData(0)==Math.round(output.getData(0)))
            correct++;
        counter++;
    }
    System.out.println((double)correct/(double)counter);
}

1.) I am feeding the data to neural network 1000. Currently testing with more/less since things got better.

2,3.) I have 16 input parameters. They consists of: Home team points, home team home wins,draws,losses, home team total won, lost, draws and form(points gain in last 5 matches). Same data goes for away team only instead of home team home wins,draws,losses away team away wins,draws,losses is used. I ll try with different training data.

1 Answers
Related