From 409f1cefdcedf24aab47c650421abda031bc90a2 Mon Sep 17 00:00:00 2001 From: Ryan Senne <50930199+rsenne@users.noreply.github.com> Date: Mon, 24 Nov 2025 11:34:37 -0500 Subject: [PATCH] Rename GAM.jl to GeneralizedAdditiveModels.jl Renamed the package and all references from GAM.jl to GeneralizedAdditiveModels.jl across source, documentation, tests, and configuration files for clarity and consistency. Updated supported families and links in documentation to reflect the new package name. --- Project.toml | 2 +- README.md | 8 +++++--- docs/Project.toml | 2 +- docs/make.jl | 8 ++++---- docs/src/api_reference.md | 4 ++-- docs/src/index.md | 6 +++--- src/{GAM.jl => GeneralizedAdditiveModels.jl} | 2 +- src/alpha.jl | 2 +- test/runtests.jl | 6 +++--- 9 files changed, 21 insertions(+), 19 deletions(-) rename src/{GAM.jl => GeneralizedAdditiveModels.jl} (94%) diff --git a/Project.toml b/Project.toml index 05f10a1..78fdffc 100644 --- a/Project.toml +++ b/Project.toml @@ -1,4 +1,4 @@ -name = "GAM" +name = "GeneralizedAdditiveModels" uuid = "cc454e9f-ce0f-441e-b193-468e31ddef4b" authors = ["Trent Henderson "] version = "0.1.0" diff --git a/README.md b/README.md index 24799f1..45e64c2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# GAM.jl +# GeneralizedAdditiveModels.jl Fit, evaluate, and visualise generalised additive models (GAMs) in native Julia ## Motivation @@ -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) @@ -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). diff --git a/docs/Project.toml b/docs/Project.toml index 7ea483c..9253d65 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -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" diff --git a/docs/make.jl b/docs/make.jl index 67be5df..2d8bf1e 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -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", @@ -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") diff --git a/docs/src/api_reference.md b/docs/src/api_reference.md index f7d1277..5dc7207 100644 --- a/docs/src/api_reference.md +++ b/docs/src/api_reference.md @@ -1,9 +1,9 @@ # API Reference ```@autodocs -Modules = [GAM] +Modules = [GeneralizedAdditiveModels] Recursive = true Public = true Private = false Order = [:module, :type, :function, :macro, :constant] -``` \ No newline at end of file +``` diff --git a/docs/src/index.md b/docs/src/index.md index 00b312d..8a06501 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -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") ``` --- @@ -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"); @@ -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. diff --git a/src/GAM.jl b/src/GeneralizedAdditiveModels.jl similarity index 94% rename from src/GAM.jl rename to src/GeneralizedAdditiveModels.jl index 47eb1ff..726aa2b 100644 --- a/src/GAM.jl +++ b/src/GeneralizedAdditiveModels.jl @@ -1,4 +1,4 @@ -module GAM +module GeneralizedAdditiveModels using Distributions, GLM, Optim, BSplines, LinearAlgebra, DataFrames, Plots, Optim diff --git a/src/alpha.jl b/src/alpha.jl index e4b6f3f..c2af46b 100644 --- a/src/alpha.jl +++ b/src/alpha.jl @@ -4,7 +4,7 @@ Calculate alpha. Usage: ```julia-repl -alpha((y, mu, Dist, Link) +alpha(y, mu, Dist, Link) ``` Arguments: - `y` : `Vector` containing the response variable. diff --git a/test/runtests.jl b/test/runtests.jl index d430a90..644f0c1 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,4 @@ -using GAM +using GeneralizedAdditiveModels using Test using RDatasets, Plots using Distributions @@ -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) @@ -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]))