示例#1
0
 public NeuralNetwork(LayerDictionary layers, AcceptanceMatcher acceptanceMatcher)
 {
     LayerDictionary = layers;
     DeltaDictionary = DeltaDictionaryBuilder.Build(LayerDictionary);
     EntryValues = new ValueList<double>();
     ExitValues = new ValueList<double>();
     _acceptanceMatcher = acceptanceMatcher;
     _errorCoefficient = 0.2;
 }
        public static DeltaDictionary Build(LayerDictionary layers)
        {
            var deltaDictionary = new DeltaDictionary();

            for (var i = 2; i <= layers.Count; i++)
                deltaDictionary.Add(i, new DeltaList(layers[i].CountPerceptrons));

            return deltaDictionary;
        }
        public NeuralNetworkBuilder(ConnectionProperties connectionProperties, PerceptronProperties perceptronProperties, AcceptanceMatcher acceptanceMatcher)
        {
            _layerDictionary = new LayerDictionary();
            _acceptanceMatcher = acceptanceMatcher;

            _layerProperties = new LayerProperties
            {
                ConnectionProperties = connectionProperties,
                PerceptronProperties = perceptronProperties
            };
        }