@@ -296,7 +296,7 @@ function generate_ζ(rng, g, ϕ::AbstractVector{FT}, xM::MT;
296
296
xMP0 = _append_each_covars (xM, CA. getdata (μ_ζP), pbm_covar_indices)
297
297
# Main.@infiltrate_main
298
298
299
- μ_ζMs0 = g (xMP0, ϕg):: MT # for gpu restructure returns Any, so apply type
299
+ μ_ζMs0 = g (xMP0, ϕg)
300
300
ζP_resids, ζMs_parfirst_resids, σ = sample_ζresid_norm (rng, μ_ζP, μ_ζMs0, ϕc. unc; n_MC, cor_ends, int_unc)
301
301
if pbm_covar_indices isa SA. SVector{0 }
302
302
# do not need to predict again but just add the residuals to μ_ζP and μ_ζMs
@@ -308,7 +308,7 @@ function generate_ζ(rng, g, ϕ::AbstractVector{FT}, xM::MT;
308
308
ζP = μ_ζP .+ rP
309
309
# second pass: append ζP rather than μ_ζP to covars to xM
310
310
xMP = _append_each_covars (xM, CA. getdata (ζP), pbm_covar_indices)
311
- μ_ζMst = g (xMP, ϕg):: MT # for gpu restructure returns Any, so apply type
311
+ μ_ζMst = g (xMP, ϕg)
312
312
ζMs = (μ_ζMst .+ rMs)' # already transform to par-last form
313
313
ζP, ζMs
314
314
end
@@ -356,26 +356,27 @@ function get_pbm_covar_indices(ζP, pbm_covars::NTuple{0},
356
356
SA. SA[]
357
357
end
358
358
359
- # function _predict_μ_ζMs(xM, ζP, pbm_covars::NTuple{N,Symbol}, g, ϕg, μ_ζMs0) where N
360
- # xMP2 = _append_PBM_covars(xM, ζP, pbm_covars) # need different variable name?
359
+ # remove?
360
+ # # function _predict_μ_ζMs(xM, ζP, pbm_covars::NTuple{N,Symbol}, g, ϕg, μ_ζMs0) where N
361
+ # # xMP2 = _append_PBM_covars(xM, ζP, pbm_covars) # need different variable name?
362
+ # # μ_ζMs = g(xMP2, ϕg)
363
+ # # end
364
+ # # function _predict_μ_ζMs(xM, ζP, pbm_covars::NTuple{0}, g, ϕg, μ_ζMs0)
365
+ # # # if pbm_covars is the empty tuple, just return the original prediction on xM only
366
+ # # # rather than calling the ML model
367
+ # # μ_ζMs0
368
+ # # end
369
+
370
+ # function _predict_μ_ζMs(xM, ζP, pbm_covar_indices::AbstractVector, g, ϕg, μ_ζMs0)
371
+ # xMP2 = _append_each_covars(xM, CA.getdata(ζP), pbm_covar_indices)
361
372
# μ_ζMs = g(xMP2, ϕg)
362
373
# end
363
- # function _predict_μ_ζMs(xM, ζP, pbm_covars::NTuple {0}, g, ϕg, μ_ζMs0)
374
+ # function _predict_μ_ζMs(xM, ζP, pbm_covars_indices::SA.StaticVector {0}, g, ϕg, μ_ζMs0)
364
375
# # if pbm_covars is the empty tuple, just return the original prediction on xM only
365
376
# # rather than calling the ML model
366
377
# μ_ζMs0
367
378
# end
368
379
369
- function _predict_μ_ζMs (xM, ζP, pbm_covar_indices:: AbstractVector , g, ϕg, μ_ζMs0)
370
- xMP2 = _append_each_covars (xM, CA. getdata (ζP), pbm_covar_indices)
371
- μ_ζMs = g (xMP2, ϕg)
372
- end
373
- function _predict_μ_ζMs (xM, ζP, pbm_covars_indices:: SA.StaticVector{0} , g, ϕg, μ_ζMs0)
374
- # if pbm_covars is the empty tuple, just return the original prediction on xM only
375
- # rather than calling the ML model
376
- μ_ζMs0
377
- end
378
-
379
380
"""
380
381
Extract relevant parameters from ζ and return n_MC generated multivariate normal draws
381
382
together with the vector of standard deviations, `σ`: `(ζP_resids, ζMs_parfirst_resids, σ)`
0 commit comments