Repository navigation
Review Changes - #96
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hey @JoseKling i found a few more things on #92 during review but I don;t want to keep holding it up so I'm doing a stacked PR here with some proposed changes. Sorry this has taken me so long. I think these all make sense but let me know if anything is afoot. I've approved #92 so this can be the next PR after
Bug fixes:
simulate(::PoissonProcess, tmin, tmax)started its first inter-arrival at 0instead of
tmin, so simulating on an interval withtmin != 0produced eventsoutside
[tmin, tmax)and a positive log-density.simulate(::PoissonProcess, ...)andsimulate_ogatasampled marks through therng-less
sample_mark, so seeded simulations were not reproducible in their marks.event_times(h, d)ignoreddfor univariate histories whileevent_marks(h, d)did not.
History(h, d)combines both and passescheck_args=false, soHistory(univariate_h, 2)silently returned a history whose times and marks haddifferent lengths. Both accessors now agree, and
History(h, d)validatesd.Historyconstructor coerceddims .= nothingwhenN == 1, whichthrows a
convertMethodErrorfor integer dims and mutates the caller's vectorfor
Union{Nothing,Int}dims. It now validates instead of coercing.time_changesized its buffers byndims(h)but loopedover
1:ndims(pp), giving aBoundsErrorwhen the process had more dimensionsthan the history. Mismatched dimensions now throw a
DimensionMismatch.JET:
fit(::Type{<:Distribution}, ::History)andfit(::Type{<:AbstractPointProcess}, ::History)intersect atType{Union{}}, so inference put aDistributionin thereturn-type union of
fit(PP, h), which is what JET was reporting. Adding aType{Union{}}method removes it, so the::AbstractPointProcessassertion inMonteCarloTest(which turned the inference gap into a possible runtimeTypeError) is no longer needed.Docs:
integrated_ground_intensity(pp, t, h, d)and required
simulate(pp, h)abstract_point_process.jldocumented the multivariatemethods as
(pp, h, t, d), but the code takes(pp, t, h, d).mark_distributionwas declared and documented twice, so the first docstring wasdiscarded with a
Replacing docswarning during precompilation. Merged into one.time_change(h, Λ)docstring, without which@docs time_changeinapi.mdrendered theInhomogeneousPoissonProcessmethod under History.Historyconstructor forms, including that a plain vectorof times always builds a univariate history.