nanograv / la_forge Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Pat Meyers requested that we add a feature to the Core objects to easily combine multiple independent chains into a single Core object.
This could work by allowing the user to input a list of chain directories into Core at which point they would have the burn-in segments on each chain removed and the chains concatenated.
This could also be extended to HypermodelCores (I think SlicesCore already does this for its use cases).
I would like to follow the design concept of corner
more and use **kwargs
calls in the various plotting functions wherever possible to allow users to tweak plots as they see fit. One example of this is in in diagnostics.plot_chains
where there are options for a hist_kwargs
and plot_kwargs
dictionary.
When you call diagnostics.plot_chains
for a core, it outputs histograms of the acceptance, which don't really make sense.
Most people probably want the histograms or traces for model parameters and the posterior, and maybe the likelihood too. We should skip the acceptance parameters when making the histograms.
There is an issue saving HyperModel cores to hdf5. The param_dict
needs to special treatment since the entries of the dictionary are lists of strings.
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-23-07c838164516> in <module>
1 pnm = 'tester'
----> 2 cH.save(f'./sw_noise_cores/{pnm}.h5')
~/software_development/la_forge/la_forge/core.py in save(self, filepath)
444 if getattr(self, d) is not None:
445 print(d)
--> 446 self._dict2hdf5(hf, getattr(self, d), d)
447
448 def _dict2hdf5(self, hdf5, d, name):
~/software_development/la_forge/la_forge/core.py in _dict2hdf5(self, hdf5, d, name)
464 g = hdf5.create_group(name)
465 for ky, val in d.items():
--> 466 g.create_dataset(ky, data=val)
467
468 def _hdf5_2dict(self, hdf5, name, dtype=float, set_return='set'):
~/anaconda3/envs/enterprise_dev/lib/python3.6/site-packages/h5py/_hl/group.py in create_dataset(self, name, shape, dtype, data, **kwds)
134
135 with phil:
--> 136 dsid = dataset.make_new_dset(self, shape, dtype, data, **kwds)
137 dset = dataset.Dataset(dsid)
138 if name is not None:
~/anaconda3/envs/enterprise_dev/lib/python3.6/site-packages/h5py/_hl/dataset.py in make_new_dset(parent, shape, dtype, data, chunks, compression, shuffle, fletcher32, maxshape, compression_opts, fillvalue, scaleoffset, track_times, external, track_order, dcpl)
116 else:
117 dtype = numpy.dtype(dtype)
--> 118 tid = h5t.py_create(dtype, logical=1)
119
120 # Legacy
h5py/h5t.pyx in h5py.h5t.py_create()
h5py/h5t.pyx in h5py.h5t.py_create()
h5py/h5t.pyx in h5py.h5t.py_create()
TypeError: No conversion path for dtype: dtype('<U35')
Trying to read in a prior file but co crashed since a tab character is written incorrectly.
I edited this line:
https://github.com/nanograv/la_forge/blob/main/la_forge/core.py#L153
and replaced
delimiter='/t' -> delimiter='\t'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.