Interpolation function(s)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 839
- Forks
- 220
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 14
Description
From @edbaskerville on December 9, 2014 23:33
It would be nice if Stan had some simple one-dimensional interpolation methods built in. (Not super-important, since this should be doable within a Stan model.)
One place this issue arises when implementing ODE models driven by empirical data sampled at discrete time intervals. Because the time derivative needs to be evaluated at arbitrary time points, the values of the driving variables need to be evaluated between sample times.
Even linear interpolation would be sufficient for many cases: e.g.,
data {
int nTimepoints;
real[nTimepoints] x;
}
// ...
x_t <- interpolate_linear(x, t);
would result in x_t equal to a value linearly interpolated from x[i], x[i + 1], where i <= t <= i + 1.
Copied from original issue: stan-dev/stan#1165
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named in the issue. Start by reviewing the proposed one-dimensional interpolation API and its use in ODE models with discretely sampled data; done would require an agreed interpolation interface and behavior for the stated example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100