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

Plotting Upgrade #137

Open
ihincks opened this issue Aug 1, 2017 · 1 comment
Open

Plotting Upgrade #137

ihincks opened this issue Aug 1, 2017 · 1 comment

Comments

@ihincks
Copy link
Collaborator

ihincks commented Aug 1, 2017

It might be worthwhile looking into doing our plots through seaborn...they have some nice stuff.

See this for example, which is only four lines of code.

@ihincks
Copy link
Collaborator Author

ihincks commented Aug 18, 2017

The seaborn library works most conveniently when the data is presented using pandas data types, like DataFrame. Perhaps a modest first step would just be to add a dataframe method to ParticleDistribution, or perhaps to SMCUpdater (which has access to modelparam_names). Something along the lines of (untested):

@property
def dataframe(self):
    # we want uniform particle weights
    dist = self if self.just_resampled else self.resampler(self)
    return pandas.DataFrame(data={
        name: dist.particle_locations[:,idx] 
        for idx, name in enumerate(self.model.modelparam_names)
    })

We don't have to make pandas a dependency if we don't want to.

EDIT: KDEs can be expensive, so maybe it should be a method with some sort of slice option.

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

No branches or pull requests

1 participant