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

Readability improvement #482

Merged
merged 23 commits into from
Jul 13, 2022
Merged

Conversation

mousum-github
Copy link
Collaborator

In this PR, to improve the readability of the GLM document, we have:

  • exported a few methods like aic, aicc, bic, dispersion so that, users can access these methods from GLM directly
  • added a short description of the methods that can be applied to a fitted model
  • added some examples to show how to use these methods

@codecov-commenter
Copy link

codecov-commenter commented Apr 26, 2022

Codecov Report

Merging #482 (4b162c8) into master (42a0d04) will increase coverage by 2.31%.
The diff coverage is n/a.

❗ Current head 4b162c8 differs from pull request most recent head d7d384d. Consider uploading reports for the commit d7d384d to get more accurate results

@@            Coverage Diff             @@
##           master     #482      +/-   ##
==========================================
+ Coverage   85.12%   87.44%   +2.31%     
==========================================
  Files           7        7              
  Lines         827      900      +73     
==========================================
+ Hits          704      787      +83     
+ Misses        123      113      -10     
Impacted Files Coverage Δ
src/GLM.jl 66.66% <ø> (+16.66%) ⬆️
src/lm.jl 96.21% <0.00%> (-0.03%) ⬇️
src/glmfit.jl 81.25% <0.00%> (+2.50%) ⬆️
src/glmtools.jl 92.99% <0.00%> (+10.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42a0d04...d7d384d. Read the comment docs.

@ViralBShah
Copy link
Contributor

Bump. Can we merge this? @nalimilan Aside from you who else might be good to ping?

docs/src/index.md Outdated Show resolved Hide resolved
@ararslan
Copy link
Member

I have a suggested fix for a typo (GitHub won't let me apply it myself 🤔) but otherwise looks good to me. Thanks for the contribution!

Copy link
Member

@kleinschmidt kleinschmidt left a comment

Choose a reason for hiding this comment

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

gotta un-wrap these lines (or indent +2 spaces) or else they'll break the list formatting. otherwise looks good!

docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
@kleinschmidt
Copy link
Member

@mousum-github if you enable "contributors can push changes to my branch" or something like that in the PR options, we can apply these changes before merging. Otherwise we'll have to wait on you to accept the suggestions.

src/GLM.jl Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved

Note that the canonical link for negative binomial regression is `NegativeBinomialLink`, but
in practice one typically uses `LogLink`.

```jldoctest methods
Copy link
Member

Choose a reason for hiding this comment

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

This is quite a long example to show on the home page. Also given how simple most of these functions are I'm not sure it's super useful to show all of them. How about adding some of these to the "Linear Model" example section instead?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

okay

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Except coef, r2, aic and prediction, others are moved to the Linear Regression example.

Copy link
Member

Choose a reason for hiding this comment

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

I'd rather move everything there to keep the home page simple. Actually we should probably also rework existing examples as it's not super logical to illustrate passing contrasts before even showing how to fit a model... We could move contents to other pages and improve them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Shall we start a different PR for something like Reorganise GLM documentation or continue updating this PR only?
My thought of keeping r2, aic and prediction along with fitting a model at the beginning is, these functionality most of the linear models consumers are looking for.
Looking for your thought.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I think it's reasonable to go ahead adding the example here and reorganize documentation separately.

@ViralBShah
Copy link
Contributor

@mousum-github Can you please update the repo settings so that folks can directly edit the PR? Also would be great if the comments can be addressed and prepared for merging.

mousum-github and others added 6 commits May 23, 2022 07:19
Corrected a type error, and changed `includs` to `includes`.

Co-authored-by: Alex Arslan <ararslan@comcast.net>
removed the definition of `bic`.

Co-authored-by: Dave Kleinschmidt <dave.f.kleinschmidt@gmail.com>
removed the definition of `dof`.

Co-authored-by: Dave Kleinschmidt <dave.f.kleinschmidt@gmail.com>
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
removed the definition of `aic` from here.

Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
@ayushpatnaikgit
Copy link
Contributor

ayushpatnaikgit commented May 23, 2022

Apologies, @ViralBShah @kleinschmidt
Allow edits from maintainers isn't showing for this pull request (and the others that we've made). Any clues why this could be happening?
It could be happening because we've made the PR from an Organization account
https://github.community/t/how-can-we-enable-allow-edits-from-maintainers-by-default/2847/9

For the time being, shall I add the four of you as collaborators to the repo?

@ViralBShah
Copy link
Contributor

Yes just add the others. Not necessary to add me.

@mousum-github
Copy link
Collaborator Author

Hi - I am aware that there is a lot of progress on all PRs in GLM including this. I was out of the station for the last couple of weeks.
I will go through all comments and will do the necessary steps form tomorrow.
I am sorry for the delay in response and any inconvenience caused due to my absence for an unusually long period.

@ararslan
Copy link
Member

No problem at all! Thanks for your efforts here and I hope you enjoyed your time away.

@ViralBShah
Copy link
Contributor

Should this be merged?

docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved
docs/src/index.md Outdated Show resolved Hide resolved

Note that the canonical link for negative binomial regression is `NegativeBinomialLink`, but
in practice one typically uses `LogLink`.

```jldoctest methods
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather move everything there to keep the home page simple. Actually we should probably also rework existing examples as it's not super logical to illustrate passing contrasts before even showing how to fit a model... We could move contents to other pages and improve them.

src/GLM.jl Outdated Show resolved Hide resolved
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
mousum-github and others added 4 commits July 3, 2022 09:53
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
@ViralBShah
Copy link
Contributor

Is this good to merge?

src/GLM.jl Outdated Show resolved Hide resolved
The suggestion is committed.

Co-authored-by: Milan Bouchet-Valat <nalimilan@club.fr>
@nalimilan nalimilan merged commit 97ef558 into JuliaStats:master Jul 13, 2022
@nalimilan
Copy link
Member

Thanks!

@ararslan ararslan deleted the readability_improvement branch July 13, 2022 16:44
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.

None yet

7 participants