-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
This was added to facilitate sampling from the prior as a starting point for SMC, but with the new functions added in #4983 this is no longer needed.
Lines 1983 to 1999 in 6d2aa5d
# Any variables from var_names that are missing must be transformed variables. | |
# Misspelled variables would have raised a KeyError above. | |
missing_names = vars_.difference(names) | |
for name in missing_names: | |
transformed_value_var = model[name] | |
rv_var = model.values_to_rvs[transformed_value_var] | |
transform = transformed_value_var.tag.transform | |
transformed_rv_var = transform.forward(rv_var, rv_var) | |
names.append(name) | |
vars_to_sample.append(transformed_rv_var) | |
# If the user asked for the transformed variable in var_names, but not the | |
# original RV, we add it manually here | |
if rv_var.name not in names: | |
names.append(rv_var.name) | |
vars_to_sample.append(rv_var) |