Control Variates
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 35/100
Línea de trabajo
Lee primero la implementación existente de posterior object y summarise_draws y, después, compárala con las implementaciones citadas de Python ControlVariates y R ZVCV. Define cómo se almacenan los gradientes, cómo se exponen las medidas resumen de control-variate y cómo la estimación recurre a una alternativa cuando los gradientes no están disponibles; se considera terminado cuando los nuevos resúmenes funcionan con gradientes poblados y, en caso contrario, conservan el comportamiento existente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
It would be really great if posterior had a capacity to have reduced the standard errors associated with the expectations it can produce (eg mean, var and sd). Recent work [1] has shown that, if we use the score function as a control variate, we can reduce such standard errors and do so in a way that is effective in the context of constrained variables (as often considered in applications of interest in the context of, for example, estimating volatility or a frequency).
Based on initial discussion, we think the approach to adopt is to augment posterior with the capacity to accept, alongside the samples, the gradient of the log posterior of mapped parameters with respect to those mapped parameters (these mapped parameters are unconstrained but are nonlinear functions of the constrained variables). The implementation then decomposes into three components:
* Storage: we will need to use protected variables (called something like .grad_log_p_unconstrained) within the posterior object itself to pass the samples and gradients around the code such that anything we contribute is compatible with existing functionality.
* Interface: We would sensibly subtly augment the functionality of summarise_draws such that it has additional measures such that the user can use (eg summarise_draws(x, "mean_control_variates",”sd_control_variates”), where "mean_control_variates" calculates the mean using control variates and “sd_control_variates” does the same for the standard deviation).
* Estimation: writing the functions to calculate the estimates themselves in such a way that, for example, mean__control_variates fails gracefully (eg by calling mean, without control variates) when .grad_log_p_unconstrained is not populated. These functions are likely to be based heavily on a combination of the code written (in Python here: https://github.com/zhouyifan233/ControlVariates) for [1] and a pre-existing R repo (here: https://github.com/LeahPrice/ZVCV).
We would welcome advice on how to progress towards a pull-request associated with this issue.
[1] S Maskell, Y Zhou and A Mira. Control Variates for Constrained Parameters. IEEE Signal Processing Letters. Vol 29, pp. 2333-2337. 2022
- Lenguaje dominante
- R
- Estrellas
- 172
- Forks
- 27
- Merge medio
- 5 d 12 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de stan-dev/posterior
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
Use testthat 3ePosiblemente ocupada @mcol la tomó hace 7 días. Abiertogood first issue test
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de stan-dev/posterior
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
cran-task-views/Spatial#127 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Add two cautions to the `simulate_dyad_responses()` helpPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertodocumentation priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Pascal-Kueng/dyadMLM#179 ·
Los mantenedores suelen responder en 1 día
-
Consider changesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
OHDSI/OmopSketch#618 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
GSK-Biostatistics/tfrmt#854 ·