Example #1
0
        private IMLMethod CreateJordanNetwork()
        {
            // construct an Jordan type network
            var pattern = new JordanPattern
            {
                ActivationFunction = new ActivationSigmoid()
            };

            pattern.InputNeurons = 1;
            pattern.AddHiddenLayer(2);
            pattern.OutputNeurons = 1;
            return(pattern.Generate());
        }
Example #2
0
        /// <see cref="INetwork.BuildJordanNetwork"/>
        public INetwork BuildJordanNetwork()
        {
            if (TrainedNetworkFile.Exists)
            {
                return(this);
            }

            var pattern = new JordanPattern {
                ActivationFunction = new ActivationSigmoid(),
                InputNeurons       = InputCount,
                OutputNeurons      = OutputCount
            };

            var network = (BasicNetwork)pattern.Generate();

            EncogDirectoryPersistence.SaveObject(TrainedNetworkFile, network);
            TrainedNetworkFile = new FileInfo(TrainedNetworkFile.FullName);

            return(this);
        }