Encog.Neural.Networks.Training.NEAT.NEATGenome.GetSplitY C# (CSharp) Method

GetSplitY() public method

Get the specified split y.
public GetSplitY ( int nd ) : double
nd int The neuron.
return double
        public double GetSplitY(int nd)
        {
            return ((NEATNeuronGene)neuronsChromosome.Genes[nd]).SplitY;
        }

Usage Example

Example #1
0
        /// <summary>
        /// Calculate the network depth for the specified genome.
        /// </summary>
        /// <param name="genome">The genome to calculate.</param>
        private void CalculateNetDepth(NEATGenome genome)
        {
            int maxSoFar = 0;

            for (int nd = 0; nd < genome.Neurons.Genes.Count; ++nd)
            {
                foreach (SplitDepth split in splits)
                {
                    if ((genome.GetSplitY(nd) == split.Value) &&
                        (split.Depth > maxSoFar))
                    {
                        maxSoFar = split.Depth;
                    }
                }
            }

            genome.NetworkDepth = maxSoFar + 2;
        }
All Usage Examples Of Encog.Neural.Networks.Training.NEAT.NEATGenome::GetSplitY