Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Julia implementation of LOO-PIT #277

Merged
merged 26 commits into from
Jul 16, 2023
Merged

Add Julia implementation of LOO-PIT #277

merged 26 commits into from
Jul 16, 2023

Conversation

sethaxen
Copy link
Member

@sethaxen sethaxen commented Jul 3, 2023

This PR adds a Julia implementation of LOO-PIT.

It differs from the Python implementation only in terms of the specific methods defined, preferring positional over keyword arguments. While the Python implementation returns a normal NumPy array, this versions returns a DimArray, whose dimensions match the observations, unless the data is a scalar.

Edit: for discrete data, different interpolation methods from Interpolations.jl DataInterpolations.jl can be specified.

@sethaxen sethaxen marked this pull request as ready for review July 15, 2023 21:17
@sethaxen
Copy link
Member Author

Even though Interpolations.jl is more widely used for interpolating, I replaced it with DataInterpolations.jl for the smoothing. Interpolations introduces a lot of invalidations (see JuliaMath/Interpolations.jl#514), which is likely the reason why adding it as a dependency increased package load time by 0.5s. DataInterpolation works fine for this application and still supports custom interpolation methods.

@sethaxen
Copy link
Member Author

The reported coverage misses appear to be miscalculations, since each of those cases is tested.

@sethaxen sethaxen merged commit ebd2b0e into main Jul 16, 2023
@sethaxen sethaxen deleted the loopit branch July 16, 2023 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant