public void CreateSolver(string name, models.Task task)
        {
            int layers = 2 + HiddenLayers.Count;

            int[]    neurons = new int[layers];
            bool[]   delays  = new bool[layers - 1];
            string[] afs     = new string[layers - 1];

            neurons[0] = InputNeuronsCount;
            for (int i = 1; i < layers - 1; i++)
            {
                neurons[i] = HiddenLayers[i - 1].NeuronsCount;
            }
            neurons[layers - 1] = OutputLayer.NeuronsCount;

            for (int i = 0; i < layers - 2; i++)
            {
                delays[i] = HiddenLayers[i].IsUsingW0;
                afs[i]    = HiddenLayers[i].SelectedAF;
            }
            delays[layers - 2] = OutputLayer.IsUsingW0;
            afs[layers - 2]    = OutputLayer.SelectedAF;

            PerceptronTopology t = new PerceptronTopology(layers, neurons, delays, afs);

            TaskSolver ts = new TaskSolver()
            {
                Name        = name,
                TypeName    = "Perceptron",
                TaskID      = task.ID,
                Description = t
            };

            ts.save();
        }
예제 #2
0
        private void importTaskSolver(ArchiveTaskSolver archSolver, int taskId)
        {
            TaskSolver solver = new TaskSolver(archSolver);

            solver.TaskID = taskId;
            solver.save();
            archSolver.ID = solver.ID;
        }
예제 #3
0
        public void CreateSolver(string name, models.Task task)
        {
            InputLayer input = new InputLayer
            {
                NeuronsCount      = InputNeuronsCount,
                ForwardConnection = InputLayerAC
            };
            var layers = new List <WardLayer>();

            for (int i = 0; i < HiddenLayers.Count; i++)
            {
                var groups = new List <NeuronsGroup>();
                for (int j = 0; j < HiddenLayers[i].Groups.Count; j++)
                {
                    groups.Add(new NeuronsGroup
                    {
                        NeuronsCount       = HiddenLayers[i].Groups[j].NeuronsCount,
                        ActivationFunction = HiddenLayers[i].Groups[j].SelectedAF,
                        HasDelay           = HiddenLayers[i].Groups[j].IsUsingW0
                    });
                }
                layers.Add(new WardLayer
                {
                    ForwardConnection = HiddenLayers[i].AC,
                    Groups            = groups
                });
            }

            var groupsOutput = new List <NeuronsGroup>();

            for (int j = 0; j < OutputLayer.Groups.Count; j++)
            {
                groupsOutput.Add(new NeuronsGroup
                {
                    NeuronsCount       = OutputLayer.Groups[j].NeuronsCount,
                    ActivationFunction = OutputLayer.Groups[j].SelectedAF,
                    HasDelay           = OutputLayer.Groups[j].IsUsingW0
                });
            }
            layers.Add(new WardLayer
            {
                ForwardConnection = OutputLayer.AC,
                Groups            = groupsOutput
            });

            WardNNTopology wnn = new WardNNTopology(input, layers);

            TaskSolver ts = new TaskSolver()
            {
                Name        = name,
                TypeName    = "WardNN",
                TaskID      = task.ID,
                Description = wnn
            };

            ts.save();
        }
        public void CreateSolver(string name, models.Task task)
        {
            KohonenNNTopology t = new KohonenNNTopology(Inputs, Outputs,
                                                        Width, Height, float.Parse(ClassEps),
                                                        SelectedInitializer, SelectedMetric);
            TaskSolver solver = new TaskSolver()
            {
                Name        = name,
                TaskID      = task.ID,
                Description = t,
                TypeName    = "KohonenNet"
            };

            solver.save();
        }
        public void CreateSolver(string name, models.Task task)
        {
            int depth = MaxTreeDepth;

            //WARNING!!!
            //Here must be selected task template
            //and number of inputs and outputs in it.
            TreeDescription td = new TreeDescription(Inputs, Outputs, depth);

            TaskSolver ts = new TaskSolver()
            {
                Name        = name,
                TypeName    = "DecisionTreeCART",
                TaskID      = task.ID,
                Description = td
            };

            ts.save();
        }
예제 #6
0
        public void CreateSolver(string name, models.Task task)
        {
            var layers = new List <ILayer>();

            foreach (ConvNNLayerViewModel layerVM in Layers)
            {
                layers.Add(layerVM.LayerParameters.LayerModel);
            }

            var        t  = new ConvNNTopology(InputWidth, InputHeight, InputDepth, layers);
            TaskSolver ts = new TaskSolver()
            {
                Name        = name,
                TypeName    = "ConvNN",
                TaskID      = task.ID,
                Description = t
            };

            ts.save();
        }