add functionality to interpolate in look-up tables
Mantenedores costumam responder em até 1 dia
@SteveBronder já está trabalhando nisso.
Desde 26/8/2026.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
Many scientific and technical models incoporate tabulated data as part of the model definition. For example, to model temperature changes in some material where the heat capacity depends on temperature, one may need to compute the heat capacities at arbitrary temperatures even if measured values are only available at some specific temperatures. Many scientific computing tools implement various methods to interpolate in tabulated data, but Stan does not (as far as I know).
I think it would be good to add such functionality, as this would expand the scope of problems that can be modelled with Stan.
There are a lot of interpolation methods out there. To start with, I used OPenAI Codex to generate simple stan code for two common interpolation methods: PCHIP (Piecewise Cubic Hermite Interpolating Polynomial) and cubic natural splines. Both have continuous first derivatives which I think is good for HMC simulations. (Piece-wise linear interpolation does not, and was not included). The code is available here: https://github.com/bmelinden/stan_interpolation, and include scripts that demonstrate both their use in Stan and good agreement with corresponding interpolation methods in R.
Both are implemented as two-step calls. First a setup using the tabulated data
W = pchip_setup(xk, yk);
and then interpolated values can be calculated as
y = pchip_eval(x, W);
Versions of these interpolation methods are available in for example Matlab (pchip, spline), Boost interpolation, scipy interpolate, and R (pracma pchip, splinefun). In fact, most software packages supply more interpolation methods than that, but these two may be a good enough start.
I would be happy to work more on this, but I am unsure on how to proceed.
- Linguagem predominante
- C++
- Estrelas
- 845
- Forks
- 225
- Merge médio
- 4d 21h
- PRs com merge (30d)
- 13
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de stan-dev/math
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 54/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 54/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
Mantenedores costumam responder em até 1 dia
-
numerics performance
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
stan-dev/math#3481 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
`eigendecompose_sym`, `eigenvalues_sym` and `eigenvectors_sym` do not compile for complex matrices of `fvar<var>` or `fvar<fvar<double>>`Talvez livre de novo Um pull request para esta issue foi fechado sem ser mesclado. Abertabug
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
stan-dev/math#3477 · 5 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de stan-dev/math
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 1 dia
-
bug test
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
OpenAssetIO/OpenAssetIO#1527 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
ROCm/rocm-systems#15475 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 68/100
Sendspin/sendspin-cpp#257 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
pocoproject/poco#5664 ·
Mantenedores costumam responder em até 2 dias