AForge.Neuro.Neuron.Randomize C# (CSharp) Method

Randomize() public method

Randomize neuron.
Initialize neuron's weights with random values within the range specified by RandRange.
public Randomize ( ) : void
return void
        public virtual void Randomize( )
        {
            double d = randRange.Length;

            // randomize weights
            for ( int i = 0; i < inputsCount; i++ )
                weights[i] = rand.NextDouble( ) * d + randRange.Min;
        }