Skip to content

Commit

Permalink
Merge branch 'main' into example/LitterModel
Browse files Browse the repository at this point in the history
  • Loading branch information
albertpod authored Nov 25, 2024
2 parents 10ce1b3 + 3e24a5c commit fdd22af
Show file tree
Hide file tree
Showing 9 changed files with 63 additions and 77 deletions.
42 changes: 26 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,35 +171,44 @@ Our high-level project roadmap outlines the key milestones and focus areas for t

For a more granular view of our progress and ongoing tasks, check out our [project board](https://github.com/orgs/reactivebayes/projects/2/views/4) or join our 4-weekly [public meetings](https://dynalist.io/d/F4aA-Z2c8X-M1iWTn9hY_ndN).

# External Contributors

RxInfer has benefited from the contributions and development efforts of external collaborators and organizations. We're grateful for their involvement in advancing the project.
## Ecosystem

## Active Inference Institute
The `RxInfer` framework consists of three *core* packages developed by [ReactiveBayes](https://github.com/reactivebayes/):

Members of the [Active Inference Institute](https://www.activeinference.org/) have been working on improving the visualization capabilities of RxInfer/GraphPPL. Their efforts focus on developing better model visualization capabilities, creating various summary/subgraph visualization modalities, implementing different graph layout algorithms, and improving the ability to inspect and understand models.
- [`ReactiveMP.jl`](https://github.com/reactivebayes/ReactiveMP.jl) - the underlying message passing-based inference engine
- [`GraphPPL.jl`](https://github.com/reactivebayes/GraphPPL.jl) - model and constraints specification package
- [`Rocket.jl`](https://github.com/reactivebayes/Rocket.jl) - reactive extensions package for Julia

For more details on their ongoing work, see the [RxInfer development project board](https://coda.io/d/RxInfer-2024-Active-Inference-Institute_ddtS-XZ4BJb/Developing-RxInfer-jl_sufeCeIa#_lutfq_7F).
# Where to go next?

## Educational Content
There are a set of [examples](https://reactivebayes.github.io/RxInfer.jl/stable/examples/overview/) available in `RxInfer` repository that demonstrate the more advanced features of the package. Alternatively, you can head to the [documentation](https://reactivebayes.github.io/RxInfer.jl/stable/) that provides more detailed information of how to use `RxInfer` to specify more complex probabilistic models.

Educational content and tutorials related to RxInfer are being developed and can be found on [Learnable Loop](https://learnableloop.com/#category=RxInfer). These resources cover a range of topics including visualizing Forney Factor Graphs, sales forecasting with time-varying autoregressive models, hidden Markov models with control, and various applications of Active Inference across different domains.

# Contributing
# Join Our Community and Contribute to RxInfer

We welcome contributions from the community. If you are interested in contributing to the development of `RxInfer.jl`, please check out our [contributing guide](https://reactivebayes.github.io/RxInfer.jl/stable/contributing/guide), the [contributing guidelines](https://reactivebayes.github.io/RxInfer.jl/stable/contributing/guidelines), or look at the [issues linked with the `good first issue` label](https://github.com/ReactiveBayes/RxInfer.jl/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) to get started.
RxInfer is a community-driven project and we welcome all contributions! To get started:
- Check out our [contributing guide](https://reactivebayes.github.io/RxInfer.jl/stable/contributing/guide)
- Review the [contributing guidelines](https://reactivebayes.github.io/RxInfer.jl/stable/contributing/guidelines)
- Browse [beginner-friendly issues](https://github.com/ReactiveBayes/RxInfer.jl/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) to find something that interests you

# Where to go next?
## Active Inference Institute Collaboration

There are a set of [examples](https://reactivebayes.github.io/RxInfer.jl/stable/examples/overview/) available in `RxInfer` repository that demonstrate the more advanced features of the package. Alternatively, you can head to the [documentation](https://reactivebayes.github.io/RxInfer.jl/stable/) that provides more detailed information of how to use `RxInfer` to specify more complex probabilistic models.
The [Active Inference Institute](https://www.activeinference.org/) community members are enhancing RxInfer/GraphPPL's visualization capabilities. Their work includes:
- Developing advanced model visualization features
- Creating summary and subgraph visualization modalities
- Implementing various graph layout algorithms
- Improving model inspection and understanding tools

## Ecosystem
For more details on ongoing work, see the [RxInfer development project board](https://coda.io/d/RxInfer-2024-Active-Inference-Institute_ddtS-XZ4BJb/Developing-RxInfer-jl_sufeCeIa#_lutfq_7F).

The `RxInfer` framework consists of three *core* packages developed by [ReactiveBayes](https://github.com/reactivebayes/):
## Learning Resources

- [`ReactiveMP.jl`](https://github.com/reactivebayes/ReactiveMP.jl) - the underlying message passing-based inference engine
- [`GraphPPL.jl`](https://github.com/reactivebayes/GraphPPL.jl) - model and constraints specification package
- [`Rocket.jl`](https://github.com/reactivebayes/Rocket.jl) - reactive extensions package for Julia
The community maintains educational content and tutorials on [Learnable Loop](https://learnableloop.com/#category=RxInfer), covering topics such as:
- Visualizing Forney Factor Graphs
- Sales forecasting with time-varying autoregressive models
- Hidden Markov models with control
- Applications of Active Inference across different domains

## JuliaCon 2023 presentation

Expand All @@ -217,6 +226,7 @@ Also check out the recorded presentation at the Julia User Group Munich meetup f
<a href="https://www.youtube.com/watch?v=KuluqEzFtm8"><img style="width: 100%" src="https://img.youtube.com/vi/KuluqEzFtm8/0.jpg"></a>
</p>


# License

[MIT License](LICENSE) Copyright (c) 2021-2024 BIASlab, 2024-present ReactiveBayes
35 changes: 13 additions & 22 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,13 @@ foreach(vcat(ExamplesOverviewPath, ExamplesCategoriesOverviewPaths)) do path
@warn "`$(path)` does not exist. Generating an empty overview. Use the `make examples` command to generate the overview and all examples."
mkpath(dirname(path))
open(path, "w") do f
write(f, """
$(isequal(path, ExamplesOverviewPath) ? "# [Examples overview](@id examples-overview)" : "")
The overview is missing. Use the `make examples` command to generate the overview and all examples.
""")
write(
f,
"""
$(isequal(path, ExamplesOverviewPath) ? "# [Examples overview](@id examples-overview)" : "")
The overview is missing. Use the `make examples` command to generate the overview and all examples.
"""
)
end
end
end
Expand Down Expand Up @@ -105,22 +108,10 @@ makedocs(;
"Model specification" => "manuals/model-specification.md",
"Constraints specification" => "manuals/constraints-specification.md",
"Meta specification" => "manuals/meta-specification.md",
"Inference specification" => [
"Overview" => "manuals/inference/overview.md",
"Static inference" => "manuals/inference/static.md",
"Streamline inference" => "manuals/inference/streamlined.md",
"Initialization" => "manuals/inference/initialization.md",
"Auto-updates" => "manuals/inference/autoupdates.md",
"Deterministic nodes" => "manuals/inference/delta-node.md",
"Non-conjugate inference" => "manuals/inference/nonconjugate.md",
"Undefined message update rules" => "manuals/inference/undefinedrules.md"
],
"Inference customization" => [
"Defining a custom node and rules" => "manuals/customization/custom-node.md",
"Inference results postprocessing" => "manuals/customization/postprocess.md",
],
"Debugging" => "manuals/debugging.md",
"Migration from v2 to v3" => "manuals/migration-guide-v2-v3.md"
"Inference specification" => ["Overview" => "manuals/inference/overview.md", "Static inference" => "manuals/inference/static.md", "Streamline inference" => "manuals/inference/streamlined.md", "Initialization" => "manuals/inference/initialization.md", "Auto-updates" => "manuals/inference/autoupdates.md", "Deterministic nodes" => "manuals/inference/delta-node.md", "Non-conjugate inference" => "manuals/inference/nonconjugate.md", "Undefined message update rules" => "manuals/inference/undefinedrules.md"],
"Inference customization" => ["Defining a custom node and rules" => "manuals/customization/custom-node.md", "Inference results postprocessing" => "manuals/customization/postprocess.md"],
"Debugging" => "manuals/debugging.md",
"Migration from v2 to v3" => "manuals/migration-guide-v2-v3.md"
],
"Library" => [
"Model construction" => "library/model-construction.md",
Expand All @@ -131,11 +122,11 @@ makedocs(;
"Examples" => [
"Overview" => "examples/overview.md", # This must be auto-generated with `make examples`
ExamplesPages...,
"External examples" => "contributing/external-examples.md"
"Contribute with examples" => "contributing/examples.md"
],
"Contributing" => [
"Contribution guide" => "contributing/guide.md",
"Contribution guidelines"=> "contributing/guidelines.md",
"Contribution guidelines" => "contributing/guidelines.md",
"Contributing to the documentation" => "contributing/new-documentation.md",
"Contributing to the examples" => "contributing/new-example.md",
"Publishing a new release" => "contributing/new-release.md"
Expand Down
11 changes: 11 additions & 0 deletions docs/src/contributing/examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# [Contribute with examples](@id examples)

We welcome examples from the community that showcase RxInfer.jl in action! Whether you're working in machine learning, signal processing, robotics, computational biology, or any other domain - your contributions help others learn and explore probabilistic modeling with RxInfer.jl.

## Featured Examples

- **Active Inference with RxInfer.jl** - Dive into the realm of Active Inference guided by [Kobus Esterhuysen](https://www.linkedin.com/in/kobusesterhuysen/) at [Learnable Loop](https://learnableloop.com/#category=RxInfer).
- **Tutorial Series on RxInfer.jl** - Explore a series of engaging tutorial videos on RxInfer.jl's functionalities, presented by [@doggotodjl](https://www.youtube.com/@doggodotjl/search?query=RxInfer).

!!! note
If you're interested in contributing an example, we'd love to hear from you! Please initiate an issue or start a new discussion on our [GitHub repository](https://github.com/reactivebayes/RxInfer.jl) to get involved.
11 changes: 0 additions & 11 deletions docs/src/contributing/external-examples.md

This file was deleted.

31 changes: 8 additions & 23 deletions examples/.meta.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,10 @@
# Please carefully read the documentation section `Contributing: new example` for more information
return (
categories = (
basic_examples = (
title = "Basic examples",
description = "Basic examples contain \"Hello World!\" of Bayesian inference in RxInfer.",
),
advanced_examples = (
title = "Advanced examples",
description = "Advanced examples contain more complex inference problems.",
),
problem_specific = (
title = "Problem specific",
description = "Problem specific examples contain specialized models and inference for various domains.",
),
hidden_examples = (
title = "",
description = ""
)
basic_examples = (title = "Basic examples", description = "Basic examples contain \"Hello World!\" of Bayesian inference in RxInfer."),
advanced_examples = (title = "Advanced examples", description = "Advanced examples contain more complex inference problems."),
problem_specific = (title = "Problem specific", description = "Problem specific examples contain specialized models and inference for various domains."),
hidden_examples = (title = "", description = "")
),
examples = [
(
Expand All @@ -39,16 +27,14 @@ return (
description = "In this demo, we are interested in Bayesian state estimation in different types of State-Space Models, including linear, nonlinear, and cases with missing observations",
category = :basic_examples
),

(
filename = "Predicting Bike Rental Demand.ipynb",
title = "Predicting Bike Rental Demand",
description = "An illustrative guide to implementing prediction mechanisms within RxInfer.jl, using bike rental demand forecasting as a contextual example.",
category = :basic_examples
),

(
filename = "Hidden Markov Model.ipynb",
filename = "Hidden Markov Model.ipynb",
title = "How to train your Hidden Markov Model",
description = "An example of structured variational Bayesian inference in Hidden Markov Model with unknown transition and observational matrices.",
category = :basic_examples
Expand Down Expand Up @@ -108,8 +94,8 @@ return (
category = :advanced_examples
),
(
filename = "Autoregressive Models.ipynb",
title = "Autoregressive Models",
filename = "Autoregressive Models.ipynb",
title = "Autoregressive Models",
description = "An example of Bayesian treatment of latent AR and ARMA models. Reference: [Albert Podusenko, Message Passing-Based Inference for Time-Varying Autoregressive Models](https://www.mdpi.com/1099-4300/23/6/683).",
category = :problem_specific
),
Expand All @@ -135,7 +121,7 @@ return (
filename = "Invertible Neural Network Tutorial.ipynb",
title = "Invertible neural networks: a tutorial",
description = "An example of variational Bayesian Inference with invertible neural networks. Reference: Bart van Erp, Hybrid Inference with Invertible Neural Networks in Factor Graphs.",
category = :problem_specific
category = :problem_specific
),
(
filename = "Probit Model (EP).ipynb",
Expand Down Expand Up @@ -167,7 +153,6 @@ return (
description = "Using Bayesian Inference and RxInfer to estimate daily litter events (adapted from https://learnableloop.com/posts/LitterModel_PORT.html)",
category = :problem_specific
),

(
filename = "Tiny Benchmark.ipynb",
title = "Tiny Benchmark",
Expand Down
2 changes: 1 addition & 1 deletion ext/ProjectionExt/ProjectionExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ function ReactiveMP.constrain_form(constraint::ProjectedTo, context::ProjectionC
return result
end

end
end
4 changes: 2 additions & 2 deletions paper/example.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ savefig(p, "inference.pdf")
using BenchmarkTools

# See the optimization flags in the `compile.sh` file
benchmark = @benchmark experiment(data[3]) setup=(data = dataset(T = 1000; precision = 1.0)) seconds = 15
benchmark = @benchmark experiment(data[3]) setup = (data = dataset(T = 1000; precision = 1.0)) seconds = 15

@info "Writing the benchmark results..."

open("benchmark.txt", "w") do file
open("benchmark.txt", "w") do file
show(file, "text/plain", benchmark)
versioninfo(file, verbose = false)
end
2 changes: 1 addition & 1 deletion paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ We present **RxInfer.jl**, a package for processing infinite data streams by rea
inference solutions for linear Gaussian dynamical systems, autoregressive models, hierarchical models,
discrete-valued models, mixture models, invertible neural networks [@van_erp_hybrid_2022], arbitrary nonlinear state transition
functions, and conjugate pair primitives.
- The inference procedure is auto-differentiable with external packages, such as **ForwardDiff.jl** [@revels_forward-mode_2016]
- The inference procedure is auto-differentiable with automatic differentiation packages of Julia community, such as **ForwardDiff.jl** [@revels_forward-mode_2016]
or **ReverseDiff.jl**.
- The inference engine supports different types of floating-point numbers, such as `Float32`, `Float64`, and `BigFloat`.

Expand Down
2 changes: 1 addition & 1 deletion scripts/examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ function Base.run(examplesrunner::ExamplesRunner)
end
end

write(io_main_overview, "- [External examples](@ref external-examples): Featured examples from the community.\n")
write(io_main_overview, "- [Contribute by examples](@ref examples): Featured examples from the community.\n")

foreach(examples) do example
mdname = replace(example[:filename], ".ipynb" => ".md")
Expand Down

0 comments on commit fdd22af

Please sign in to comment.