Esempio n. 1
0
        //Prend en charge le remplissage de la liste des ateliers.
        private void PopulateList()
        {
            upSlotForServerHead.ContentTemplateContainer.Controls.Clear();

            List <DonneesAteliers> results = DataInterpretation.LookupTags(activeTags);

            if (txtSearch.Text != "")
            {
                results = results.SearchFor(txtSearch.Text.Trim());
            }

            var orderedResults = results.OrderBy(atelier => atelier.dateDebut);

            foreach (DonneesAteliers atelier in orderedResults)
            {
                upSlotForServerHead.ContentTemplateContainer.Controls.Add(DataInterpretation.CreateInfoPanel(atelier));
            }
        }
Esempio n. 2
0
        private static void RunMetaOptimizer()
        {
            Console.WriteLine("Start");
            Console.WriteLine("Creating Tipper...");
            var tipper = new Tipper();

            Console.WriteLine("Creating Optimizer...");
            var optimizer = new Optimizer();
            var output    = "";

            optimizer.LowerLimitLayers         = 1;
            optimizer.UpperLimitLayers         = 1;
            optimizer.LowerLimitNeuronsInLayer = 3;
            optimizer.UpperLimitNeuronsInLayer = 3;
            optimizer.LowerLimitEpochs         = 750;
            optimizer.UpperLimitEpochs         = 750;
            optimizer.EpochsStep = 500;
            optimizer.TrainingTestingDataDelineationCallbacks = new List <Func <Data, Tuple <Data, Data> > >()
            {
                OneYearAgoTenYearsTrained,
                TwoYearAgoTenYearsTrained,
                ThreeYearAgoTenYearsTrained,
                FourYearAgoTenYearsTrained
            };



            Console.WriteLine("Optimizing...");
            var optimizationDataSetOne = new List <List <int> >
            {
                new List <int> {
                    0
                },
                new List <int> {
                    1
                },
                new List <int> {
                    5
                },
                new List <int> {
                    21
                }
            };
            var optimizationDataSetTwo = new List <List <int> >
            {
                new List <int> {
                    0
                },
                new List <int> {
                    1
                },
                new List <int> {
                    5
                },
                new List <int> {
                    21
                }
            };
            var optimizationDataSetThree = new List <List <int> >
            {
                new List <int> {
                    0
                },
                new List <int> {
                    1
                },
                new List <int> {
                    5
                },
                new List <int> {
                    21
                }
            };
            var optimizationDataSetFour = new List <List <int> >
            {
                new List <int> {
                    0
                },
                new List <int> {
                    1
                },
                new List <int> {
                    5
                },
                new List <int> {
                    21
                }
            };
            var optimizationDataSetFive = new List <List <int> >
            {
                new List <int> {
                    0
                },
                new List <int> {
                    1
                },
                new List <int> {
                    5
                },
                new List <int> {
                    21
                }
            };

            foreach (var one in optimizationDataSetOne)
            {
                foreach (var two in optimizationDataSetTwo)
                {
                    foreach (var three in optimizationDataSetThree)
                    {
                        foreach (var four in optimizationDataSetFour)
                        {
                            foreach (var five in optimizationDataSetFive)
                            {
                                var interpretation = new DataInterpretation(
                                    new List <DataInterpretationRule>
                                {
                                    new DataInterpretationRule(DataInterpretationRuleType.SCORES_BY_TEAM, one),
                                    new DataInterpretationRule(DataInterpretationRuleType.SCORES_BY_GROUND, two),
                                    new DataInterpretationRule(DataInterpretationRuleType.SCORES_BY_STATE, three),
                                    new DataInterpretationRule(DataInterpretationRuleType.SCORES_BY_DAY, four),
                                    new DataInterpretationRule(DataInterpretationRuleType.SCORES_BY_SHARED_OPPONENTS, five)
                                });
                                if (interpretation.Rules.Sum(i => i.Periods.Sum()) > 0)
                                {
                                    Console.WriteLine("Loading data...");
                                    var data = tipper.GetMatchDataFromLeagueBetween(new RoundShell(2003, 0, false), new RoundShell(2019, 0, false), interpretation);
                                    Console.WriteLine("Optimizing...{0}-{1}-{2}-{3}-{4}", one[0], two[0], three[0],
                                                      four[0],
                                                      five[0]);
                                    optimizer.Optimize(data, UIHelpers.SuccessConditionTotal, UIHelpers.Deconvert);
                                }
                            }
                        }
                    }
                }
            }
            //0- 0-21-21-21- 1 gives 2018 =74%
            //1- 0- 0- 1-21- 1 gives 2018 =66%
            //1- 0- 0- 0-21- 1 gives 2018 =66%
            #endregion
        }