Example #1
0
        public ART1 BuildNetwork(int inputSize, float vigilance = 0.5f, int initialClusterCount = 0)
        {
            Contract.Requires<ArgumentOutOfRangeException>(0 < inputSize, "Size of the input vector must be positive.");
            Contract.Requires<ArgumentOutOfRangeException>(0f < vigilance && vigilance < 1f, "Vigilance parameter must be in (0,1) range.");
            Contract.Requires<ArgumentOutOfRangeException>(0 <= initialClusterCount, "Initial cluster count must be nonnegative.");

            InputNeuronFactory inputNeuronFactory = new InputNeuronFactory();
            InputLayerBuilder inputLayerBuilder = new InputLayerBuilder(inputNeuronFactory);
            InputLayer inputLayer = inputLayerBuilder.Build(inputSize);

            ConnectionFactory connectionFactory = new ConnectionFactory();
            OutputNeuronFactory outputNeuronFactory = new OutputNeuronFactory(inputLayer, connectionFactory);
            OutputLayerBuilder outputLayerBuilder = new OutputLayerBuilder(outputNeuronFactory);
            OutputLayer outputLayer = outputLayerBuilder.Build(initialClusterCount);

            OrientingSubsystem orientingSubsystem = new OrientingSubsystem(inputLayer, outputLayer);
            orientingSubsystem.Vigilance = vigilance;
            AttentionalSubsystem attentionalSubsystem = new AttentionalSubsystem(orientingSubsystem, inputLayer, outputLayer);

            ART1 network = new ART1(attentionalSubsystem);

            return network;
        }
Example #2
0
 internal ART1(AttentionalSubsystem attentionalSubsystem)
 {
     this.attentionalSubsystem = attentionalSubsystem;
 }