public OutputNeuronFactory(InputLayer inputLayer, ConnectionFactory connectionFactory) { this.inputLayer = inputLayer; this.connectionFactory = connectionFactory; weightUpperBound = L / (L - 1f + inputLayer.Size); }
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; }