Skip to content

Commit

Permalink
Merge pull request #19 from JuliaStats/aa/linpred
Browse files Browse the repository at this point in the history
Add `linearpredictor` and `linearpredictor!`
  • Loading branch information
ararslan authored Aug 3, 2022
2 parents e42a88a + a634719 commit 14e0ba7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ docs/site/
*.jl.cov
*.jl.*.cov
*.jl.mem
Manifest.toml
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "StatsAPI"
uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0"
authors = ["Milan Bouchet-Valat <[email protected]"]
version = "1.4.0"
version = "1.5.0"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
17 changes: 16 additions & 1 deletion src/regressionmodel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ function reconstruct! end
offset(model::RegressionModel)
Return the offset used in the model, i.e. the term added to the linear predictor with
known coefficient 1.
known coefficient 1, or `nothing` if the model was not fit with an offset.
"""
function offset end

"""
linearpredictor(model::RegressionModel)
Return the model's linear predictor, `Xβ` where `X` is the model matrix and `β` is the
vector of coefficients, or `Xβ + offset` if the model was fit with an offset.
"""
function linearpredictor end

"""
linearpredictor!(storage, model::RegressionModel)
In-place version of [`linearpredictor`](@ref), storing the result in `storage`.
"""
function linearpredictor! end

2 comments on commit 14e0ba7

@ararslan
Copy link
Member Author

Choose a reason for hiding this comment

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

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

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

Registration pull request created: JuliaRegistries/General/65585

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.5.0 -m "<description of version>" 14e0ba729d08d771c462b1c494d81462961d7745
git push origin v1.5.0

Please sign in to comment.