pymc-devs / pymc-experimental

Home Page:https://pymc-experimental.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Variationally Informed Parameterization: Recreate VIP class

ferrine opened this issue · comments

So far the VIP transform creates an object with lambdas for manipulation at application time. If any model transform is done later (do, cond), the object is no longer relevant. The idea is to write a helper function as:

class VIP:
    @classmethod
    def from_model(cls, model, var_names: list[str]) -> VIP:
        # Collect lambdas based on name pattern "name" -> f"{name}::lam_logit__"
        ...