Recovering computational parameters with custom network #218
-
Hi, I have made a custom network structure and want to fit it to observed data from an experiment to recover estimates of model parameters. I can't work out if this is possible for custom networks, or if only for standard 2 and 3 level HGFs? I.e., i have the known inputs plus observed behaviours. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Harris-D Thank you for reaching out. It is indeed possible to sample any custom network to infer parameter estimates, it simply requires:
You can find details on how to write a response function in this tutorial - the response function should return the log probability of your observation given a set of parameters. Then you might create a PyMC Op for this function, and the gradient of this function. You can find an example in the categorical HGF tutorial and in this notebook (using the grad function, that is easier to work with). You can also refer to these tutorials from the PyMC team: here and here. Let me know if you manage to make this work. Cheers, |
Beta Was this translation helpful? Give feedback.
Hi @Harris-D
Thank you for reaching out. It is indeed possible to sample any custom network to infer parameter estimates, it simply requires:
You can find details on how to write a response function in this tutorial - the response function should return the log probability of your observation given a set of parameters.
Then you might create a PyMC Op for this function, and the gradient of this function. You can find an example in the categorical HGF tutorial and in this notebook (using the grad function, that is easier to work with). You can also refer to these tutorials f…