public EvolutionaryFitness ( ActivationNetwork network, double input, double output ) : Accord.Genetic | ||
network | ActivationNetwork | Neural network for which fitness will be calculated. |
input | double | Input data samples for neural network. |
output | double | Output data sampels for neural network (desired output). |
return | Accord.Genetic |
public EvolutionaryFitness( ActivationNetwork network, double[][] input, double[][] output )
{
if ( ( input.Length == 0 ) || ( input.Length != output.Length ) )
{
throw new ArgumentException( "Length of inputs and outputs arrays must be equal and greater than 0." );
}
if ( network.InputsCount != input[0].Length )
{
throw new ArgumentException( "Length of each input vector must be equal to neural network's inputs count." );
}
this.network = network;
this.input = input;
this.output = output;
}