Пример #1
0
        public DeltaRuleLearning(CounterPropagationNetwork network)
        {
            // check layers count
            if ( network.LayersCount != 2 )
            {
                throw new ArgumentException( "Invalid nuaral network. It should have one layer only." );
            }

            this.network = network;
        }
Пример #2
0
        public SOMLayerLearning(CounterPropagationNetwork network)
        {
            int neuronsCount = network[0].NeuronsCount;
            width = (int)Math.Sqrt(neuronsCount);

            this.Neighborhood = new TwoDimensionalNeighborhood(width);
            this.Conscience = new Conscience(neuronsCount, 0);

            if (width*width != neuronsCount)
            {
                throw new ArgumentException("Invalid network size");
            }

            // ok, we got it
            this.network = network;
            this.width = width;
            this.height = height;
        }