Skip to content
New issue

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

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

Already on GitHub? # to your account

LREG: deprecate trans argument #100

Merged
merged 5 commits into from
Oct 10, 2019
Merged

Conversation

wildart
Copy link
Collaborator

@wildart wildart commented Jun 4, 2019

Deprecate trans in favor of dims argument

@wildart wildart mentioned this pull request Jun 4, 2019
5 tasks
@wildart wildart changed the title LLSQ: deprecate trans argument LREG: deprecate trans argument Jun 4, 2019
@@ -31,7 +31,7 @@ The package provides ``llsq`` to solve these problems:

This function accepts two keyword arguments:

- ``trans``: whether to use the transposed form. (default is ``false``)
- ``dims``: whether input observations stored as rows (1) or columns (2). (default is ``2``)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- ``dims``: whether input observations stored as rows (1) or columns (2). (default is ``2``)
- ``dims``: whether input observations are stored as rows (``1``) or columns (``2``). (default is ``2``)

@@ -132,7 +132,7 @@ The package provides ``ridge`` to solve these problems:

This function accepts two keyword arguments:

- ``trans``: whether to use the transposed form. (default is ``false``)
- ``dims``: whether input observations stored as rows (1) or columns (2). (default is ``2``)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- ``dims``: whether input observations stored as rows (1) or columns (2). (default is ``2``)
- ``dims``: whether input observations are stored as rows (``1``) or columns (``2``). (default is ``2``)


For a matrix ``Y`` comprised of multiple columns:
For a matrix column-stored regressors ``X`` and dependent variables comprised of multiple columns ``Y``:
Copy link
Member

Choose a reason for hiding this comment

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

The text still says "a matrix" but you mention two matrices, right?

trans::Bool=false, bias::Bool=true,
dims::Union{Integer,Nothing}=nothing) where {T<:Real}
if dims === nothing
Base.depwarn("`trans` argument is deprecated, use llsq(X, Y, dims=d) instead.", :trans)
Copy link
Member

Choose a reason for hiding this comment

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

AFAICT this warning will be printed even if the caller didn't set trans, in which case it will be confusing. I guess it should say that dims is required, and only mention trans if it's true, right?

Also, the default for dims should be 1 until we remove the deprecation, or that will break code.

@wildart
Copy link
Collaborator Author

wildart commented Jun 8, 2019

I switched back default dims to 1.

@wildart wildart merged commit 0d000b7 into JuliaStats:master Oct 10, 2019
@wildart wildart modified the milestone: v1.0.0 Feb 25, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants