Example #1
0
        public static List <double> BuildInputs(List <Match> history, Match m, DataInterpretation interpretation = null)
        {
            if (interpretation == null)
            {
                interpretation = AFLDataInterpreter.BespokeLegacyInterpretation;
            }

            var input = AFLDataInterpreterTotal.New().BuildInputs(history, m, interpretation);

            return(input);
        }
Example #2
0
        public Data BuildFullDataSet()
        {
            var       data      = new Data();
            const int fromYear  = 2008;
            const int fromRound = 0;
            const int toYear    = 2015;
            const int toRound   = 24;
            var       rounds    = League.GetRounds(0, 0, toYear, toRound).Where(x => x.Matches.Count > 0).ToList();

            foreach (
                var m in
                rounds.Where(r => (r.Year == fromYear && r.Number >= fromRound) || (r.Year > fromYear))
                .SelectMany(r => r.Matches))
            {
                var history =
                    rounds.Where(r => !r.Matches.Any(rm => rm.Date >= m.Date)).SelectMany(r => r.Matches).ToList();
                data.DataPoints.Add(AFLDataInterpreterTotal.New().BuildDataPoint(history, m));
            }
            return(data);
        }