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

Handle games without actions #507

Open
probberechts opened this issue Apr 12, 2023 · 0 comments
Open

Handle games without actions #507

probberechts opened this issue Apr 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@probberechts
Copy link
Member

Some games (e.g, postponed games) might have an empty event feed. This results in errors while computing features and labels.

import pandas as pd
import socceraction.atomic.vaep.features as fs
import socceraction.atomic.spadl as atomicspadl

xfns = [ fs.goalscore ]
actions = pd.DataFrame()
gamestates = fs.gamestates(atomicspadl.add_names(actions), 2)
X = pd.concat([fn(gamestates) for fn in xfns], axis=1)
>> IndexError: ...
@probberechts probberechts added the bug Something isn't working label Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant