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()); }
/// <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); }