Ejemplo n.º 1
0
        private static void LoadAllMatches()
        {
            var matches = JsonDb.GetMatches();

            foreach (var gr in matches.GroupBy(m => m.HomeGoals == m.AwayGoals))
            {
                Console.WriteLine($"{gr.Key} {gr.Count()}");
            }
        }
Ejemplo n.º 2
0
        private static void Predict()
        {
            var matches = JsonDb.GetMatches();

            ILearningScenario <Match> scenario = new LearningScenario <Match>();

            scenario.MaxIterations = 1000;
            scenario.MaxError      = 0.1;
            scenario.InputParams   = new List <IParamDefinition <Match> >();
            scenario.InputParams.Add(MatchParams.GetLastFiveHomeMatches(matches));
            scenario.InputParams.Add(MatchParams.GetLastFiveAwayMatches(matches));
            scenario.OutputParams = new List <IParamDefinition <Match> >();
            scenario.OutputParams.Add(MatchParams.GetResultValue(matches));

            var network = Training.Train(scenario, matches);

            Prediction.Compute(network, scenario, matches);
        }