Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The SequenceStateBuilder needs to be improved #385

Open
probberechts opened this issue Dec 20, 2024 · 3 comments
Open

The SequenceStateBuilder needs to be improved #385

probberechts opened this issue Dec 20, 2024 · 3 comments

Comments

@probberechts
Copy link
Contributor

I think the logic for building sequences could be improved. Below are a few issues that I noticed:

  • Typically, an event stream starts with a few off-ball events such as an event that announces the lineups, the start of a period, etc. These events should not be part of the possession sequence of a team.
  • Events in which the goal keeper picks up or claims the ball should be able to start a new sequence
  • Take ons should be able to start a new sequence
  • Successful interceptions should be able to start a new sequence
  • A single failed pass should not start a new sequence
  • When a sequence ends with a duel between two players, the lost duel should be part of the old sequence and the winning duel should be part of the new sequence
  • A shot should not always end a sequence. For example, a rebound should be part of the same sequence.
@probberechts
Copy link
Contributor Author

While looking up some definitions, I figured Opta uses both the concept of a "sequence" and a "possession".

events are organised into sequences and possessions.
Sequences are defined as passages of play which belong to one team and are ended by defensive actions, stoppages in play or a shot.
Possessions are defined as one or more sequences in a row belonging to the same team. A series of passes leading to a shot which is saved and results in a corner kick would comprise one possession since the same team retains control, but more than one sequence, since the ball has gone out of play. A possession is ended by the opposition gaining control of the ball.
-- https://www.statsperform.com/resource/introducing-a-possessions-framework

Hence, maybe we should keep the SequenceStateBuilder as is and add a PossessionStateBuilder?

@DriesDeprest
Copy link
Contributor

Yes, I think it would be wise to make the distinction and use the definitions used by Opta.

@koenvo
Copy link
Contributor

koenvo commented Dec 27, 2024

Would be great. Not sure how difficult this will make things, but maybe good to be able to pass some configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants