6758-Project / hockey

0 stars 0 forks source link

M2 - Feature Engineering II Bonus #35

Closed TimkLee closed 2 years ago

TimkLee commented 2 years ago

Hello,

I have added the bonus advance features, power-play time, number of friendly non-goalie skaters and number of opposing non-goalie skaters. Pulled penalty information from the raw data.

Two additional columns are extracted from the raw data, penaltySeverity and penaltyMinutes. 4 new features are created. PowerPlayTimerHome : The power play timer for the home team. PowerPlayTimerGuest : The power play timer for the guest team. Home_Skaters : Number of home team skaters, no less than 3. Guest_Skaters : Number of guest team skaters, no less than 3.

I have a few questions.

I tried to cross reference the data we have against some other data that specifically look at the effect of pulling the goalie. I could not find any indication on when the goalie is being pulled in the API raw data. Are there any special sequence or events when pulling a goalie (e.g. game pause)? How long can the goalie be pulled? (https://github.com/chord-analytics/nhl-goalie-pull-optimization/blob/master/data/processed/csv/20172018_goalie_pulls_2019-04-25.csv) Would pulling the goalie be considered a "power play" as well? I have also e-mailed the TA about this.

The implementation relies on a for loop and I was not able to calculate the features without it. Any insight on how I can improve this code would be greatly appreciated.

JakeColor commented 2 years ago

R.e. pulling the goalie, I couldn't find clear indication of this in the rawAPI event types either. Goalie pulls can occur while play is active.

Only "Goal" types seem to include information about whether or not the goalie was pulled, i.e. is_empty_net=True. Even then, the strength information isn't informative:

        "result" : {
          "event" : "Goal",
          "eventCode" : "DET640",
          "eventTypeId" : "GOAL",
          "description" : "Denis Malgin (4) Wrist Shot, assists: Frank Vatrano (12), Mike Hoffman (19)",
          "secondaryType" : "Wrist Shot",
          "strength" : {
            "code" : "EVEN",
            "name" : "Even"
          },
          "gameWinningGoal" : false,
          "emptyNet" : true
        },

Let's set this aside for now.

TimkLee commented 2 years ago

Samples.

image

TimkLee commented 2 years ago
  • power_play_time_elapsed

No problem, updated. image

TimkLee commented 2 years ago

Third Time's the Charm. Changed skater number and powerplay timer to values prior to the event occurrence.

image