Example #1
0
        public static void Generate(ForestConfig config, bool useOneOf)
        {
            var generate = new GenerateData(config);

            generate.Step1();
            generate.Step2();
            DataNormalization norm = generate.Step3(useOneOf);

            // save the normalize object
            SerializeObject.Save(config.NormalizeFile.ToString(), norm);

            // create and save the neural network
            BasicNetwork network =
                EncogUtility.SimpleFeedForward(norm.GetNetworkInputLayerSize(),
                                               config.HiddenCount, 0, norm.GetNetworkOutputLayerSize(), true);

            EncogDirectoryPersistence.SaveObject(config.TrainedNetworkFile, network);
        }
Example #2
0
        public static void Generate(ForestConfig config, bool useOneOf)
        {
            var generate = new GenerateData(config);
            generate.Step1();
            generate.Step2();
            DataNormalization norm = generate.Step3(useOneOf);

            // save the normalize object
            SerializeObject.Save(config.NormalizeFile.ToString(), norm);

            // create and save the neural network
            BasicNetwork network = EncogUtility.SimpleFeedForward(norm
                                                                      .GetNetworkInputLayerSize(), config.HiddenCount, 0,
                                                                  norm
                                                                      .GetNetworkOutputLayerSize(), true);
            EncogDirectoryPersistence.SaveObject(config.TrainedNetworkFile, network);
        }