Skip to content

Commit

Permalink
more equations
Browse files Browse the repository at this point in the history
  • Loading branch information
LegrandNico committed Dec 17, 2024
1 parent d12f9c8 commit 50581be
Showing 1 changed file with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,17 @@ def posterior_update_mean_continuous_node_unbounded(

# posterior total uncertainty about the child
beta = (
1 / attributes[volatility_child_idx]["expected_precision"]
1 / attributes[volatility_child_idx]["precision"]
+ (
attributes[volatility_child_idx]["mean"]
- attributes[volatility_child_idx]["expected_mean"]
)
** 2
)

return mu_l(alpha, beta, gamma)
new_mu = new_mu_l1(alpha, beta, gamma, attributes, node_idx)

return new_mu


@partial(jit, static_argnames=("edges", "node_idx"))
Expand All @@ -99,15 +101,26 @@ def posterior_update_precision_continuous_node_unbounded(

# posterior total uncertainty about the child
beta = (
1 / attributes[volatility_child_idx]["expected_precision"]
1 / attributes[volatility_child_idx]["precision"]
+ (
attributes[volatility_child_idx]["mean"]
- attributes[volatility_child_idx]["expected_mean"]
)
** 2
)

return pi_l(alpha, beta, gamma)
new_pi = new_pi_l1(alpha, gamma, attributes, node_idx)

return new_pi

def new_pi_l1(alpha, gamma, attributes, node_idx):
return attributes[node_idx]["expected_precision"] + attributes[node_idx]["volatility_coupling_children"][0]**2 * 0.5 * omega(alpha, gamma) * (1 - omega(alpha, gamma))


def new_mu_l1(alpha, beta, gamma, attributes, node_idx):
return gamma + 0.5 / pi_l1(alpha, gamma) * omega(alpha, gamma) * delta(
alpha, beta, gamma
) * attributes[node_idx]["volatility_coupling_children"][0]


def s(x, theta, psi):
Expand Down

0 comments on commit 50581be

Please sign in to comment.