Skip to content

Turing Sampling specified parameters #1911

Open
@astro-kevin

Description

@astro-kevin

Copied from https://discourse.julialang.org/t/turing-sampling-specified-parameters/90360

In my model, I have

@model function runmodel(stuff, parameters)
parameters ~ Product([Uniform(0,5),
            Uniform(0, 1),
...])
predictions, otherstuff = model(stuff, parameters)
obs, var = findobsvar(stuff, otherstuff)
obs ~ MvNormal(predictions, Diagonal(var))

where findobsvar is a function which takes in stuff and returns my observations and variances which I need for my multivariate normal distribution.

However, when I run my model using sample, I find that it has obs as a parameter in addition to parameters.

How do I stop that? I only want parameters as my variable since I’m only trying to constrain parameters of my model. findobsvar is just a helper function in getting the values of obs and var within the model.

Edit: I have added how I define my priors for parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions