-
Notifications
You must be signed in to change notification settings - Fork 23
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
statsmodels compatibility #17
Conversation
treat vectors of EventTimes like continuous terms. needs JuliaStats/StatsModels.jl#106 (to just copy continuous terms instead of converting to Float64).
You'll probably want to turn the StatsModels upper bound in the Project.toml into a lower bound in order for this to work, since |
I guess we'll need to wait until StatsModels is tagged, since otherwise the StatsModels version requirement is unsatisfiable. |
## StatsModels compatibility | ||
|
||
StatsModels.concrete_term(t::Term, xs::AbstractVector{<:EventTime}, ::Nothing) = | ||
StatsModels.ContinuousTerm(t.sym, first(xs), first(xs), first(xs), first(xs)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not actually compute the mean, variance, min and max?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that even defined for event times? How would the truncation be handled?
Maybe a better option is to add methods like mean(<:AbstractVector{<:EventTime})
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard to tell... But it also sounds weird to pass identical values. Maybe nothing
should be allowed?
Tests pass locally for me with StatsModels 0.6.0 but I've restarted the travis job to make sure... |
Has the StatsModels 0.6.0 tag not been merged to General or something? |
No it has but it lists julia >= 1 in the project.toml so that 0.7 build failed...do you care about 0.7 compatibility still? |
(I'll update the travis config and Project.toml in this PR if you want to drop 0.7 support...) |
Down with 0.7! Down with 0.7! |
Oh, I see, I was fooled because I was looking at the push build rather than the PR build. That's why I didn't see that it was only not working on 0.7. |
I guess also the version should be bumped right? |
Yep |
treat vectors of EventTimes like continuous terms. needs JuliaStats/StatsModels.jl#106 (to just copy continuous terms instead of converting to Float64).
fixes #10 , #16