File tree 1 file changed +8
-10
lines changed
1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -223,23 +223,21 @@ end
223
223
224
224
function _predictrBCM (node:: GPSplitNode , x:: AbstractMatrix )
225
225
μ = zeros (size (x,1 ))
226
- t = zeros (size (x,1 ))
227
- β = zeros (size (x,1 ))
228
226
229
227
gp = leftGP (node)
230
228
s = diag (kernelmatrix (gp. kernel, x, x)) .+ getnoise (gp)
231
229
230
+ C = deepcopy (1 ./ s)
231
+
232
232
for (k,c) in enumerate (children (node))
233
233
μ_, t_ = _predictPoE (c, x)
234
- β_ = 0.5 * ( log .(s) - log .( inv .(t_)))
235
- t[:] += β_ .* t_
236
- μ[:] += β_ .* t_ .* μ_
237
- β[:] += β_
234
+ s_ = 1 ./ t_
235
+ β_ = 0.5 * ( log .(s) - log .(s_))
236
+ C += ( β_ .* t_) - (β_ ./ s)
237
+ μ += μ_ .* (β_ .* t_)
238
238
end
239
- z = (1 .- β) ./ s
240
- t += z
241
- t[t .<= 0 ] .= 1e-8
242
- return μ ./ t, t
239
+
240
+ return μ ./ C, C
243
241
end
244
242
245
243
function predict (node:: GPSplitNode , x:: AbstractMatrix )
You can’t perform that action at this time.
0 commit comments