@@ -99,13 +99,8 @@ function calculate_posterior_precision(node::BinaryStateNode)
99
99
child = node. edges. observation_children[1 ]
100
100
101
101
# Simple update with inifinte precision
102
- if child. parameters. input_precision == Inf
103
- posterior_precision = Inf
104
- # Update with finite precision
105
- else
106
- posterior_precision =
107
- 1 / (node. states. posterior_mean * (1 - node. states. posterior_mean))
108
- end
102
+ posterior_precision = Inf
103
+
109
104
110
105
# # If the child is a category child ##
111
106
elseif length (node. edges. category_children) > 0
@@ -141,30 +136,7 @@ function calculate_posterior_mean(node::BinaryStateNode, update_type::HGFUpdateT
141
136
# Set the posterior to missing
142
137
posterior_mean = missing
143
138
else
144
- # Update with infinte input precision
145
- if child. parameters. input_precision == Inf
146
- posterior_mean = child. states. input_value
147
-
148
- # Update with finite input precision
149
- else
150
- posterior_mean =
151
- node. states. prediction_mean * exp (
152
- - 0.5 *
153
- node. states. prediction_precision *
154
- child. parameters. category_means[1 ]^ 2 ,
155
- ) / (
156
- node. states. prediction_mean * exp (
157
- - 0.5 *
158
- node. states. prediction_precision *
159
- child. parameters. category_means[1 ]^ 2 ,
160
- ) +
161
- (1 - node. states. prediction_mean) * exp (
162
- - 0.5 *
163
- node. states. prediction_precision *
164
- child. parameters. category_means[2 ]^ 2 ,
165
- )
166
- )
167
- end
139
+ posterior_mean = child. states. input_value
168
140
end
169
141
170
142
# # If the child is a category child ##
0 commit comments