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

Update fittable function to remove InteractiveUtils from dependencies #35

Merged
merged 1 commit into from
Oct 23, 2024
Merged
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: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
DataScienceTraits = "6cb2f572-2d2b-4ba6-bdb3-e710fa044d6c"
Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7"
GeoTables = "e502b557-6362-48c1-8219-d30d308dcdb0"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Meshes = "eacbb407-ea5a-433e-ab97-5258b1ca43fa"
NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
Expand Down Expand Up @@ -37,7 +36,6 @@ CategoricalArrays = "0.10"
DataScienceTraits = "1.0"
Distances = "0.10"
GeoTables = "1.21"
InteractiveUtils = "1.9"
LinearAlgebra = "1.9"
Makie = "0.21"
Meshes = "0.51 - 0.52"
Expand Down
1 change: 0 additions & 1 deletion src/GeoStatsFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ using Optim
using Tables
using Distances
using Bessels: gamma, besselk
using InteractiveUtils: subtypes
using NearestNeighbors: MinkowskiMetric
using OhMyThreads: tmapreduce
using DataScienceTraits
Expand Down
15 changes: 12 additions & 3 deletions src/fitting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,18 @@
# ------------------------------------------------------------------

# models that can be fitted currently
fittable() = filter(isstationary, setdiff(subtypes(Variogram), (NuggetEffect, NestedVariogram)))
# code to generate the model list:
# filter(isstationary, setdiff(subtypes(Variogram), (NuggetEffect, NestedVariogram))) |> Tuple
fittable() = (
CircularVariogram,
CubicVariogram,
ExponentialVariogram,
GaussianVariogram,
MaternVariogram,
PentasphericalVariogram,
SineHoleVariogram,
SphericalVariogram
)

"""
FitAlgo
Expand Down Expand Up @@ -81,8 +92,6 @@ using algorithm `algo` and return the one with minimum error.
julia> fit(Variogram, g)
julia> fit(Variogram, g, WeightedLeastSquares())
```

See also `GeoStatsFunctions.fittable()`.
"""
fit(::Type{Variogram}, g::EmpiricalVariogram, algo::FitAlgo=WeightedLeastSquares(); kwargs...) =
fit(fittable(), g, algo; kwargs...)
Expand Down