Closed SamuelBrand1 closed 2 months ago
I have a query about this bit because it:
obs
as an immutable Tuple
Tuple
at each step.I think it would be simpler to have a pattern like
obs = map(obs_model.models, obs_model.model_names) do model, model_name
@submodel obs_tmp = generate_observations(
model, y_t[Symbol(model_name)], Y_t[Symbol(model_name)])
obs_tmp
end
This might also be better for type stability and not generating lots of objects. map
is smart enough to sidestep these issues e.g.
xs_tpl = Tuple(i for i = 1:10)
ys_tpl = Tuple(j for j = 1:10)
output = map(xs_tpl, ys_tpl) do x, y
x^y
end
output isa Tuple
#true
Yes I agree. I think for some reason I wasn't clear you could use map
with a macro call inside of it
Yeah there might be an edge case problem... it would be a good first issue for someone to check out?
Good idea. If this works it could be an option in ConcatLatentModels
and CombineLatentModels
vs the current use of self referencing functions
Closed by #358
_Originally posted by @SamuelBrand1 in https://github.com/CDCgov/Rt-without-renewal/pull/296#discussion_r1650785638_