Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = "GAM"
name = "GeneralizedAdditiveModels"
uuid = "cc454e9f-ce0f-441e-b193-468e31ddef4b"
authors = ["Trent Henderson <trent.henderson1@outlook.com>"]
version = "0.1.0"
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GAM.jl
# GeneralizedAdditiveModels.jl
Fit, evaluate, and visualise generalised additive models (GAMs) in native Julia

## Motivation
Expand All @@ -7,7 +7,7 @@ Fit, evaluate, and visualise generalised additive models (GAMs) in native Julia

## Usage

The basic interface to `GAM.jl` is the `gam` function, which is as easy as:
The basic interface to `GeneralizedAdditiveModels.jl` is the `gam` function, which is as easy as:

```{julia}
mod = gam("Volume ~ s(Girth, k=10, degree=3) + s(Height, k=10, degree=3)", df)
Expand All @@ -28,12 +28,14 @@ Note that currently, the following families are supported:
* `Normal`
* `Poisson`
* `Gamma`
* `Bernoulli`

And the following link functions:

* `Identity`
* `Log`
* `Logit`

## Development notes

`GAM.jl` is very much in active development. Please check back for updates and new features or feel free to contribute yourself! The project to-date has been a collaboration between [Trent Henderson](https://github.com/hendersontrent) and [Mason Yahr](https://github.com/yahrMason).
`GeneralizedAdditiveModels.jl` is very much in active development. Please check back for updates and new features or feel free to contribute yourself! The project to-date has been a collaboration between [Trent Henderson](https://github.com/hendersontrent) and [Mason Yahr](https://github.com/yahrMason).
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GAM = "cc454e9f-ce0f-441e-b193-468e31ddef4b"
GeneralizedAdditiveModels = "cc454e9f-ce0f-441e-b193-468e31ddef4b"
LiveServer = "16fef848-5104-11e9-1b77-fb7a48bbb589"
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
8 changes: 4 additions & 4 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ using Documenter

# Make sure the package loads when building from docs/
push!(LOAD_PATH, joinpath(@__DIR__, "..", "src"))
using GAM
using GeneralizedAdditiveModels

# Doctesting
DocMeta.setdocmeta!(GAM, :DocTestSetup, :(using GAM); recursive=true)

makedocs(
sitename = "GAM.jl",
modules = [GAM],
sitename = "GeneralizedAdditiveModels.jl",
modules = [GeneralizedAdditiveModels],
pages = [
"Home" => "index.md",
"API Reference" => "api_reference.md",
Expand All @@ -22,4 +22,4 @@ makedocs(
)

# for later
# deploydocs(repo = "github.com/hendersontrent/GAM.jl.git", devbranch = "main")
# deploydocs(repo = "github.com/hendersontrent/GeneralizedAdditiveModels.jl.git", devbranch = "main")
4 changes: 2 additions & 2 deletions docs/src/api_reference.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# API Reference

```@autodocs
Modules = [GAM]
Modules = [GeneralizedAdditiveModels]
Recursive = true
Public = true
Private = false
Order = [:module, :type, :function, :macro, :constant]
```
```
6 changes: 3 additions & 3 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ To install the package, clone it directly from the repository:

```julia
using Pkg
Pkg.add(url="https://github.com/hendersontrent/GAM.jl")
Pkg.add(url="https://github.com/hendersontrent/GeneralizedAdditiveModels.jl")
```

---
Expand All @@ -44,7 +44,7 @@ Fitting a GAM in GeneralizedAdditiveModels.jl is quick and easy. The syntax of t

```julia
using RDatasets
using GAM
using GeneralizedAdditiveModels

df = dataset("datasets", "trees");

Expand All @@ -55,7 +55,7 @@ mod = gam("Volume ~ s(Girth, k=10, degree=3) + s(Height, k=10, degree=3)", df)

**GeneralizedAdditiveModels.jl** is under active development, and contributions are very welcome!

- If you’ve found a bug or want to propose a feature, please [open an issue](https://github.com/hendersontrent/GAM.jl/issues).
- If you’ve found a bug or want to propose a feature, please [open an issue](https://github.com/hendersontrent/GeneralizedAdditiveModels.jl/issues).
- If your idea gets positive feedback, feel free to submit a pull request.
- If you’re unsure where to start, you can also browse the open issues and pick one that interests you.

Expand Down
2 changes: 1 addition & 1 deletion src/GAM.jl → src/GeneralizedAdditiveModels.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module GAM
module GeneralizedAdditiveModels

using Distributions, GLM, Optim, BSplines, LinearAlgebra, DataFrames, Plots, Optim

Expand Down
2 changes: 1 addition & 1 deletion src/alpha.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Calculate alpha.
Usage:
```julia-repl
alpha((y, mu, Dist, Link)
alpha(y, mu, Dist, Link)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice catch!

```
Arguments:
- `y` : `Vector` containing the response variable.
Expand Down
6 changes: 3 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using GAM
using GeneralizedAdditiveModels
using Test
using RDatasets, Plots
using Distributions
Expand All @@ -9,7 +9,7 @@ df = dataset("datasets", "trees");

#-------------------- Run tests -----------------

@testset "GAM.jl" begin
@testset "GeneralizedAdditiveModels.jl" begin

mod = gam("Volume ~ s(Girth, k=10, degree=3) + s(Height, k=10, degree=3)", df)

Expand Down Expand Up @@ -168,7 +168,7 @@ end
# Check that predictions are reasonable
x_test = [-1.0, 0.0, 1.0]
for xi in x_test
pred_mat = GAM.BuildPredictionMatrix([xi], mod.Basis[1], mod.ColMeans[1])
pred_mat = GeneralizedAdditiveModels.BuildPredictionMatrix([xi], mod.Basis[1], mod.ColMeans[1])
pred_eta = mod.Coef[1] .+ pred_mat * mod.Coef[mod.CoefIndex[1]]
pred_p = 1 / (1 + exp(-pred_eta[1]))

Expand Down