Skip to content

Commit

Permalink
Merge pull request #109 from ilabcode/documentation_polish
Browse files Browse the repository at this point in the history
Documentation polish
  • Loading branch information
PTWaade authored Nov 2, 2023
2 parents 2be18d5 + 124c88f commit 22a7619
Show file tree
Hide file tree
Showing 19 changed files with 18,258 additions and 69 deletions.
12 changes: 6 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ makedocs(;
),
pages = [
"Introduction to Hierarchical Gaussian Filtering" => "./index.md",
#"Theory" => [
# "./theory/genmodel.md",
# "./theory/node.md",
# "./theory/vape.md",
# "./theory/vope.md",
#],
"Theory" => [
"./theory/genmodel.md",
"./theory/node.md",
"./theory/vape.md",
"./theory/vope.md",
],
"Using the package" => [
"The HGF Nodes" => "./generated_markdowns/the_HGF_nodes.md",
"Building an HGF" => "./generated_markdowns/building_an_HGF.md",
Expand Down
13 changes: 12 additions & 1 deletion docs/src/Julia_src_files/premade_HGF.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
# - [Categorical 3-level HGF](#Categorical-3-level-HGF)
# - [Categorical 3-level state transition HGF](#Categorical-3-level-state-transition)

# ![continuous 2-level graph](../images/HGF_structures/all_models.png)

# #Load data for examples

Expand Down Expand Up @@ -40,13 +39,19 @@ inputs_binary = CSV.read(hgf_path_binary * "classic_binary_inputs.csv", DataFram

# ## Continuous 2-level HGF



# ![continuous 2-level graph](../images/HGF_structures/continuous.svg)


# The continuous 2-level HGF is structured with following nodes:

# - input node: continuous
# - state nodes:
# - 1st level: continuous (value coupling to input node)
# - 2nd level: continous (volatility coupling to 1st level)


#Create HGF and Agent
continuous_2_level = premade_hgf("continuous_2level");
agent_continuous_2_level =
Expand Down Expand Up @@ -93,6 +98,9 @@ plot_trajectory(

# ## Binary 2-level HGF

# ![continuous 2-level graph](../images/HGF_structures/binary.svg)


# - input node: binary
# - state nodes:
# - 1st level: binary (value coupling to input node)
Expand Down Expand Up @@ -143,6 +151,9 @@ plot_trajectory(agent_binary_3_level, ("x3", "posterior"))

# ## Categorical 3-level HGF

# ![continuous 2-level graph](../images/HGF_structures/categorical.svg)


# The categorical 3-level HGF model takes an input from one of m categories and learns the probability of a category appearing.

# - input node: categorical
Expand Down
70 changes: 9 additions & 61 deletions docs/src/Julia_src_files/the_HGF_nodes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,67 +2,13 @@

# In this section we will cover the types of nodes, their parameters and the rules for structuring your own HGF.


# ### Overview

# - [The Node Types In an HGF and their states](#The-Node-Types-In-an-HGF)
# - [Building principles ](#Building-principles )

# ### The Node Types In an HGF

# We have six types of nodes in the HGF: binary (state node and input node), categorical (state node and input node), and continuous (state node and input node).

# If a node's parameters are configured with a default value, they are stated below as well.

# We provide an overview of the states in each of the nodes.

# 1. [Binary Nodes](#Binary-Nodes)
# 1. [State Node: States and parameters](#The-states-of-binary-state-nodes-and-parameters)
# 2. [Input Node: States and parameters](#The-states-of-binary-input-nodes-and-parameters)

# 3. [Categorical Nodes](#Categorical-Nodes)
# 1. [State Node: States and parameters](#The-states-of-Categorical-state-nodes-and-parameters)
# 2. [Input Node: States and parameters](#The-states-of-Categorical-Input-nodes-and-parameters)

# 4. [Continuous Nodes](#Continuous-Nodes)
# 1. [State Node: States and parameters](#The-states-of-Continuous-state-nodes-and-parameters)
# 2. [Input Node: States and parameters](#The-states-of-Continuous-Input-nodes-and-parameters)

# ![states and parameters](../images/states_nodes/all_states.svg)

# ## Binary Nodes

# ### The states of binary state nodes

# - posterior_mean
# - posterior_precision
# - value\_prediction\_error
# - prediction_mean
# - prediction_precision

# ### Parameters

# - Value coupling


# ### The states of binary input nodes and parameters

# - input value
# - value prediction error

# ### Parameters

# - Category means (default is [0,1])
# - Input precision (default is infinite input precision)


# ## Categorical Nodes

# ### The states of Categorical state nodes and parameters

# - posterior
# - value prediction error
# - prediction
# ## Building principles

# The following rules apply for connecting nodes, when customizing your own HGF structure:
# ### Parameters

# - no parameters in the categorical state node
Expand Down Expand Up @@ -112,17 +58,15 @@
# - input noise (default is 0)
# - value coupling
# - volatility coupling



# ## Building principles

# ### Binary state node rules:

# - Can only have exactly one value parent
# - Can only have excatly one value child
# - Can only have a contionus state node as value parent

# ![states and parameters](../images/states_nodes/binary_nodes.svg)

# ### continuous state node rules:

# - Can’t have binary input node as child
Expand All @@ -132,8 +76,12 @@
# - Can’t have the same value parent as volatility parent
# - Can’t have the same value child as volatility child

# ![states and parameters](../images/states_nodes/continuous_nodes.svg)

# ### Categorical state node rules:

# - Can only have exactly one value child
# - Can only have categorical input node as child
# - Can only have binary state node as parents

# ![states and parameters](../images/states_nodes/categorical_nodes.svg)
1 change: 0 additions & 1 deletion docs/src/generated_markdowns/dummy.jl

This file was deleted.

Binary file removed docs/src/images/HGF_structures/Binary_2_level.png
Binary file not shown.
Binary file removed docs/src/images/HGF_structures/Binary_3_level.png
Binary file not shown.
Binary file removed docs/src/images/HGF_structures/JGET.png
Binary file not shown.
Binary file removed docs/src/images/HGF_structures/all_models.png
Binary file not shown.
Loading

0 comments on commit 22a7619

Please sign in to comment.