Skip to content

Conversation

palday
Copy link
Member

@palday palday commented Jun 7, 2023

from #507

mousum-github and others added 7 commits June 7, 2023 12:01
backport of #507

---------

Co-authored-by: Mousum <mousum@spotle.ai>
Co-authored-by: ayushpatnaikgit <ayushpatnaik@gmail.com>
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Co-authored-by: Ayush Patnaik <u6012645@anu.edu.au>
Co-authored-by: harsharora21 <harsharora1337@gmail.com>
Co-authored-by: Bogumił Kamiński <bkamins@sgh.waw.pl>
(cherry picked from commit a8016bd)
@codecov
Copy link

codecov bot commented Jun 7, 2023

Codecov Report

❌ Patch coverage is 86.79245% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.11%. Comparing base (6406a70) to head (cd187fb).
⚠️ Report is 2 commits behind head on v1.

Files with missing lines Patch % Lines
src/linpred.jl 83.63% 18 Missing ⚠️
src/GLM.jl 50.00% 1 Missing ⚠️
src/lm.jl 97.14% 1 Missing ⚠️
src/negbinfit.jl 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               v1     #537      +/-   ##
==========================================
+ Coverage   87.39%   88.11%   +0.72%     
==========================================
  Files           7        7              
  Lines         952     1077     +125     
==========================================
+ Hits          832      949     +117     
- Misses        120      128       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-authored-by: Mousum Dutta <44145580+mousum-github@users.noreply.github.com>
@nalimilan
Copy link
Member

Is there any particular place we should look at (i.e. where you had to adapt the original PR)?

@palday
Copy link
Member Author

palday commented Jun 7, 2023

@nalimilan if you look at the diff excluding the first commit, then you can see things that were non obvious in the cherry-pick -- one exception (not including a local fit(::Type, ::FormulaTerm,...)) method, I accepted all changes from the original PR. The follow-up modifications were related to the additional redirection from TableRegressionModel.

Copy link
Member

@nalimilan nalimilan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Just a few comments then. There are also lines that are not covered by tests, are these real?

```jldoctest categorical
julia> using CategoricalArrays, DataFrames, GLM, StableRNGs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what doctest updated things to.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird... :-/

atol=atol, rtol=rtol, verbose=verbose, kwargs...)
μ = regmodel.rr.mu

μ = _rr(regmodel).mu
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Above the code seems to assume that regmodel is a TableRegressionModel, so you could just do regmodel.model.rr.mu and remove _rr.

GLM.Link(m::GeneralizedLinearModel) = Link(m.rr)
Link(r::GlmResp) = r.link
Link(m::GeneralizedLinearModel) = Link(m.rr)
Link(m::StatsModels.TableRegressionModel{<:GeneralizedLinearModel}) = Link(m.model)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit surprised that you need to add this, as usually method delegations were only done in StatsModels, for functions from StatsAPI. For example, below Distribution isn't defined for TableRegressionModel. Where is this method called from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link is owned by GLM.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They're called in the tests.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but I wonder why we never needed this kind of definition before. I think the code was designed so that we never called functions on objects which could either be AbstractGLMs or TableRegressionModels.

Maybe this doesn't matter much as 1.x is a dead-end anyway.

@test coef(gm1) == coef(gm2) [10, 1]
end

@testset "formula accessor" begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This accessor isn't introduced by the PR, right? Why are tests added then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They were part of the cherry-picked commit.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see it at https://github.com/JuliaStats/GLM.jl/pull/507/files. I think this comes from the commit which removed TableRegressionModel, which isn't relevant here.

return res
end


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intended?

@nilshg
Copy link

nilshg commented Nov 18, 2024

What's the status of this? The 1.9 release notes mention that QR is now available, but that doesn't actually seem to be the case?

@palday
Copy link
Member Author

palday commented Nov 20, 2024

The automatically generated release notes just indicate that a certain PR has been merged, not that it's part of the release. The QR decomposition is available on trunk, but it's not been back ported to the 1.x series. We've been putting off a 2.0 release for a few reasons, but maybe we can go ahead and release it.

@nilshg
Copy link

nilshg commented Nov 21, 2024

Any reason why it's not being backported? As far as I can tell this could just be a feature release, as Cholesky would remain the default?

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.

4 participants