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

Convert Sample Space dict to Named Tuples #21

Open
adamzev opened this issue May 15, 2018 · 0 comments
Open

Convert Sample Space dict to Named Tuples #21

adamzev opened this issue May 15, 2018 · 0 comments
Assignees

Comments

@adamzev
Copy link
Owner

adamzev commented May 15, 2018

The way the sample space is coded awkwardly encodes object like data as a string.

Here's what it looks like:

        self.sample_space = {
            'Walk: Base on balls': base_on_balls / outcomes,
            'Walk: Hit by pitch': stats['hbp'] / outcomes,
            'Walk: Intentional Walk': stats["ibb"] / outcomes,
            'Out: SO': stats["so"] / outcomes,

This needs to be coverted to named tuples. Something like ("Result Type", "Result Details", "Probability") and the code that uses it needs to be adjusted.

@adamzev adamzev changed the title Sample Space object encodes data as string Convert Sample Space dict to Named Tuples Jun 16, 2018
@adamzev adamzev self-assigned this Jul 1, 2018
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

1 participant