Пример #1
0
        public UnitPredictor()
        {
            //  Matrix for predicting TD passes POvPD
            _tdp = new[, ]
            {
                { 1, 0, 0, 0, 0 },
                { 1, 1, 0, 0, 0 },
                { 2, 1, 1, 0, 0 },
                { 2, 2, 1, 1, 0 },
                { 3, 2, 2, 1, 1 }
            };

            //  Matrix for predicting YDp POvPD
            _ydp = new[, ]
            {
                { 250, 200, 175, 150, 100 },
                { 275, 250, 200, 175, 150 },
                { 300, 275, 250, 200, 175 },
                { 325, 300, 275, 250, 200 },
                { 350, 325, 300, 275, 250 }
            };

            //  Matrix for predicting TD runs  ROvRD
            _tdr = new[, ]
            {
                { 1, 0, 0, 0, 0 },
                { 2, 1, 0, 0, 0 },
                { 3, 2, 1, 0, 0 },
                { 3, 3, 2, 1, 0 },
                { 4, 3, 3, 2, 1 }
            };

            //  Matrix for predicting YDr  ROvRD
            _ydr = new[, ]
            {
                { 116, 100, 75, 55, 45 },
                { 125, 116, 100, 75, 55 },
                { 140, 130, 116, 100, 75 },
                { 160, 140, 125, 116, 100 },
                { 200, 160, 140, 125, 116 }
            };

            //  Matrix for predicting TD passes adjustment based on Pass protection
            _ppr = new[, ]
            {
                { -1, -1, -2, -2, -3 },
                { 0, 0, 0, -1, -2 },
                { 1, 0, 0, 0, -1 },
                { 1, 1, 0, 0, 0 },
                { 2, 1, 1, 0, 0 }
            };
            PredictionStorer = new DbfPredictionStorer();
            WriteProjection  = true;
            StorePrediction  = true;
        }
Пример #2
0
        public void TipSeason(string season)
        {
            //  load a season
            var nflSeason        = new NflSeason(season);
            var predictionStorer = new DbfPredictionStorer();
            var mp = new MillerPredictor {
                AuditTrail = true
            };

            //  for each game
            foreach (NFLGame game in nflSeason.GameList)
            {
                if (!game.IsPlayoff())
                {
                    //    predict game
                    var result = mp.PredictGame(game, predictionStorer, game.GameDate);
                }
            }
        }
Пример #3
0
        public UnitPredictor()
        {
            //  Matrix for predicting TD passes POvPD
            _tdp = new[,]
                {
                    {1, 1, 0, 0, 0},
                    {2, 1, 1, 0, 0},
                    {3, 2, 1, 1, 0},
                    {3, 3, 2, 1, 1},
                    {4, 3, 3, 2, 1}
                };

            //  Matrix for predicting YDp POvPD
            _ydp = new[ , ]
                {
                    {250, 200, 150, 100, 050},
                    {300, 250, 200, 150, 100},
                    {350, 300, 250, 200, 150},
                    {400, 350, 300, 250, 200},
                    {450, 400, 350, 300, 250}
                };

            //  Matrix for predicting TD runs  ROvRD
            _tdr = new[,]
                {
                    {1, 0, 0, 0, 0},
                    {1, 1, 0, 0, 0},
                    {2, 1, 1, 0, 0},
                    {2, 2, 1, 1, 0},
                    {3, 2, 2, 1, 1}
                };

            //  Matrix for predicting YD5  ROvRD
            _ydr = new[ , ]
                {
                    {116, 125, 75,  55,   45},
                    {125, 116, 100, 75,   55 },
                    {140, 125, 116, 100,  75 },
                    {160, 140, 125, 116, 100},
                    {200, 160, 140, 125, 116}
                };

            //  Matrix for predicting TD passes adjustment based on Pass protection
            _ppr = new[,]
                {
                    {-1, -1, -2, -2, -3},
                    {0, 0, 0, -1, -2},
                    {1, 0, 0, 0, -1},
                    {1, 1, 0, 0, 0},
                    {2, 1, 1, 0, 0}
                };
            PredictionStorer = new DbfPredictionStorer();
            WriteProjection = true;
            StorePrediction = true;
        }