You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
ihincks commentedon Aug 18, 2017
The
seabornlibrary works most conveniently when the data is presented usingpandasdata types, likeDataFrame. Perhaps a modest first step would just be to add a dataframe method toParticleDistribution, or perhaps toSMCUpdater(which has access to modelparam_names). Something along the lines of (untested):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.