Skip to content

Commit

Permalink
Fixes #86
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffheaton committed Jan 2, 2016
1 parent 87b334d commit 11a42fc
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion encog-core-cs/Neural/NEAT/NEATNetwork.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace Encog.Neural.NEAT
/// {ACM Press} }
/// </summary>
[Serializable]
public class NEATNetwork : IMLRegression, IMLError
public class NEATNetwork : IMLRegression, IMLClassification, IMLError
{
/// <summary>
/// The neuron links.
Expand Down Expand Up @@ -289,5 +289,12 @@ private void InternalCompute()
_preActivation[j] = 0.0F;
}
}

/// <inheritdoc/>
public int Classify(IMLData input)
{
IMLData output = Compute(input);
return EngineArray.MaxIndex(output);
}
}
}

2 comments on commit 11a42fc

@TheDevelolper
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realise that regression problems were so closely related to classification. I think a little more needs to be done though.

encog-core-cs/Neural/Networks/Training/TrainingSetScore.cs is also tailored to regression training. Modifying this file will affect references and interfaces.

@TheDevelolper
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem I see is that when using the EncogUtility's Train to error method the output error does not seem to correspond to the number of correct predictions my neural network makes.

For example I am trying to overtrain my network to get 100% correct answers (using my training set as an evaluation set also). Not for a real application. Just so that I can observe the error reduce.

I am seeing that whilst the error reduces the number of correct predictions increases for classification problems.

Please sign in to comment.