Пример #1
0
        private static void Test3()
        {
            Dataset dataset = new Dataset("dataset.txt");

            int[]         architecture = new int[] { 2, 8, 4, 3 };
            NeuralNetwork nn           = new NeuralNetwork(architecture);

            GA testEl2 = new GA(50000, 35, 0.05, NeuralNetwork.CalculateNumOfParams(architecture), 5, -5, nn, dataset,
                                0.05, 0.05, 0.8, 0.12, 0.5, "test2", true);

            testEl2.ZapocniAlgoritam();
        }
Пример #2
0
        private static void Test5Short()
        {
            Dataset dataset = new Dataset("dataset.txt");

            int[]         architecture = new int[] { 2, 8, 3 };
            NeuralNetwork nn           = new NeuralNetwork(architecture);

            GA testEl2 = new GA(200000, 20, 0.2, NeuralNetwork.CalculateNumOfParams(architecture), 5, -5, nn, dataset,
                                0.04, 0.04, 0.8, 0.12, 0.3, "prvi", false);
            var param = testEl2.ZapocniAlgoritam();

            nn.InspectOutput(param, dataset);
        }
Пример #3
0
        private static void Test5()     //ovaj koristi za 2 x 8 x 4 x 3
        {
            Dataset dataset = new Dataset("dataset.txt");

            int[]         architecture = new int[] { 2, 8, 4, 3 };
            NeuralNetwork nn           = new NeuralNetwork(architecture);

            GA testEl2 = new GA(200000, 25, 0.20, NeuralNetwork.CalculateNumOfParams(architecture), 5, -5, nn, dataset,     //najbolji do sad
                                0.04, 0.04, 0.5, 0.22, 0.8, "prvi", false);
            var param = testEl2.ZapocniAlgoritam();

            nn.InspectClassification(param, dataset);
            nn.WriteParamsToFile(param, "2843n1b.txt", "2843n2b.txt");
        }
Пример #4
0
        private static void TestLong()
        {
            Dataset dataset = new Dataset("dataset.txt");

            int[]         architecture = new int[] { 2, 8, 4, 3 };
            NeuralNetwork nn           = new NeuralNetwork(architecture);

            GA testEl2 = new GA(800000, 25, 0.20, NeuralNetwork.CalculateNumOfParams(architecture), 5, -5, nn, dataset,
                                0.04, 0.04, 0.5, 0.22, 0.8, "prvi", false);
            var param = testEl2.ZapocniAlgoritam();

            nn.InspectClassification(param, dataset);
            nn.WriteParamsToFile(param, "2843n1new.txt", "2843n2new.txt");
        }
Пример #5
0
        private static void Test2()
        {
            Dataset dataset = new Dataset("dataset.txt");

            int[]         architecture = new int[] { 2, 8, 4, 3 };
            NeuralNetwork nn           = new NeuralNetwork(architecture);

            //GA testEl2 = new GA(50000, 60, 0.1, NeuralNetwork.CalculateNumOfParams(architecture), 3, -3, nn, dataset,
            //    0.05, 0.05, 0.6, 1, 1, "sample string");                                                                                   //first try
            GA testEl2 = new GA(50000, 20, 0.1, NeuralNetwork.CalculateNumOfParams(architecture), 5, -5, nn, dataset,
                                0.05, 0.05, 0.8, 0.12, 0.5, "prvi", true);

            testEl2.ZapocniAlgoritam();
        }