Giter Site home page Giter Site logo

ilabcode / hierarchicalgaussianfiltering.jl Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 7.0 11.24 MB

The Julia implementation of the generalised hierarchical Gaussian filter

Home Page: https://ilabcode.github.io/HierarchicalGaussianFiltering.jl/

License: Other

Julia 100.00%
bayesian-inference computational-psychiatry reinforcement-learning

hierarchicalgaussianfiltering.jl's People

Contributors

anna280 avatar chmathys avatar dependabot[bot] avatar github-actions[bot] avatar jacopoc7 avatar ptwaade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hierarchicalgaussianfiltering.jl's Issues

Testing suite

We should use a shared testing suite with the Python toolbox for the update equations and whole model fitting.

  • Single update equations
  • Utility functions

Canonical tests

  • Noisy binary HGF
  • Categorical HGF
  • State transition HGF

Change names of variables:

evolution rate -> volatility
evolution rate for input nodes -> input noise
auxiliary prediction precision -> volatility-weighted precision

input precision greek notation

input precision is an omega in continuous input nodes, and is a pi in binary nodes.
And it is currently called en evolution rate in the input node as well.
How should we name these things?

Minimize stored information

Don't store anything in nodes that is not necessary for computations at next timestep.
Create functions for calculating these values if necessary

Don't save history as default

Code Style

Make sure that all code style is to best Julia practice standards

find_optimal_parameters

Function for finding the HGF parameters that minimizes surprise
can be done by gradient descent, sampling, variational bayes etc

Appreciation and Suggestion for HierarchicalGaussianFiltering.jl

I recently read the paper "The Generalized Hierarchical Gaussian Filter" and found it an exciting extension of the Hierarchical Gaussian Filtering (HGF) framework. I appreciate your efforts and the paper's potential applications in cognitive neuroscience and computational concepts of mental disorders.

I want to bring to your attention some prior works such as "Online Message Passing-based Inference in the Hierarchical Gaussian Filter" and "The Switching Hierarchical Gaussian Filter," and also "Bayesian joint state and parameter tracking in autoregressive models" by Senoz et al seem to be relevant to this research. It might be helpful to consider these works in the context of HierarchicalGaussianFiltering.jl and include them in the documentation or examples to provide additional user insights.

Most components for implementing the generalized HGF are already available in RxInfer.jl, which treats everything as message-passing algorithms. In the near future, we will probably assign someone from the BIASlab to implement the generalized HGF within RxInfer.jl toolbox. In fact, RxInfer.jl has already some vanilla implementations of online inference MP in HGF .

Thank you once again for your valuable contributions.

Fix README

  • PkgEval badge
  • Deps badge
  • Version badge
  • General setup

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Add premade models

Premade HGFs

  • Kalman filter HGF (Continuous 1-level)
  • HGF with filtering of category means

Action models

  • Confidence HGF
  • Linear regression

Input transform

Make optional mapping for inputs before they are given to the HGF.
For example state transition sets to the encoding that works for the state transition HGF

proper get_prediction function for online inference

initial/ first predictions from binary children should be drawn from the parents whose predictions comes from parents ect.

Current agnostic solution (mainly concerned categorical HGF) is to initialize the prediction in the binary state nodes. Therefore, parents initial predictions need to be equal.

Documentation

Some examples of nice documentation in related packages:

  • The GitHub action needs to be fixed.

README:

  • A logo
  • A paragraph describing the toolbox
  • Figures of the premande HGFs
  • A hello world example
  • PkgEval badge
  • Deps badge
  • Version badge

User guide:

  • Theory module with figures
  • API examples
  • Add the equations to the docstrings

Notebooks:

  • Multilevel fitting

  • Categorical HGF

  • Kalman filter HGF

  • Add to Documenter REPO

Control nodes

Nodes for dynamically changing states and parameters of the HGF based on context or actions

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.