bambinos / kulprit Goto Github PK
View Code? Open in Web Editor NEWKullback-Leibler projections for Bayesian model selection in Python
Home Page: https://kulprit.readthedocs.io
License: MIT License
Kullback-Leibler projections for Bayesian model selection in Python
Home Page: https://kulprit.readthedocs.io
License: MIT License
To improve discoverability of Kulprit, we may want to add a section to the Bambi documentation https://bambinos.github.io/bambi/notebooks/ linking to Kulprit docs or at least one example.
Allow a user to call ReferenceModel.project()
while passing a tuple of parameter names as opposed to only either a list or an integer.
Currently only the Gaussian observation family is implemented in kulprit
. We should also allow the use Binomial and Poisson observation families in the reference model.
These are the families supported in Bambi https://bambinos.github.io/bambi/notebooks/getting_started.html#families we should aim to have parity.
Kulprit currently supports:
Hi,
Beginner here. I tried to reduce my model to as few variables as possible, and follow the Quickstart, but still getting this error. Not sure how to debug.
ppi = kpt.ProjectionPredictive(model, idata)
Repro is here: https://github.com/lucabol/divs/blob/master/Analysis.ipynb
Full error below
UserWarning Traceback (most recent call last)
Cell In[6], [line 3](vscode-notebook-cell:?execution_count=6&line=3)
[1](vscode-notebook-cell:?execution_count=6&line=1) #idata.to_netcdf("kptidata1.nc")
[2](vscode-notebook-cell:?execution_count=6&line=2) #idata = az.from_netcdf("kptidata1.nc")
----> [3](vscode-notebook-cell:?execution_count=6&line=3) ppi = kpt.ProjectionPredictive(model, idata)
[4](vscode-notebook-cell:?execution_count=6&line=4) ppi.search()
File ~/miniconda3/envs/bap3/lib/python3.11/site-packages/kulprit/reference.py:62, in ProjectionPredictive.__init__(self, model, idata)
[60](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/lucabol/dev/divs/~/miniconda3/envs/bap3/lib/python3.11/site-packages/kulprit/reference.py:60) # test compatibility between model and idata
[61](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/lucabol/dev/divs/~/miniconda3/envs/bap3/lib/python3.11/site-packages/kulprit/reference.py:61) if not check_model_idata_compatability(model=model, idata=idata):
---> [62](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/lucabol/dev/divs/~/miniconda3/envs/bap3/lib/python3.11/site-packages/kulprit/reference.py:62) raise UserWarning("Incompatible model and inference data.")
[64](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/lucabol/dev/divs/~/miniconda3/envs/bap3/lib/python3.11/site-packages/kulprit/reference.py:64) # log reference model and inference data
[65](https://vscode-remote+wsl-002bubuntu.vscode-resource.vscode-cdn.net/home/lucabol/dev/divs/~/miniconda3/envs/bap3/lib/python3.11/site-packages/kulprit/reference.py:65) self.model = model
UserWarning: Incompatible model and inference data.
Add two tutorials to the docs:
kulprit
workflow (similar to the main projpred
vignette);We could use the body-fat example from this paper https://arxiv.org/abs/2306.15581
I don't thing this is a priority at the moment. But at some point in the future, making this change will be beneficial. The two most obvious benefits will be removing one dependency, as aesara is already a Bambi dependency. And avoid duplicating code from bambi.
We could use this issue to track the functions that we actually need tom PyTorch that are currently absent from aesara. And then decided if those should be added upstream or we can add it as part of kulprit. I think we just require a couple of functions or so.
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.