From 4c3073b121181e3a29e49e6c0dc68d741bf6c033 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Mon, 22 Jan 2024 17:53:00 +0000 Subject: [PATCH] build based on 32735a3 --- dev/about/citing.html | 2 +- dev/about/community.html | 2 +- dev/about/license.html | 2 +- dev/contributing.html | 2 +- dev/data.html | 68 +++++++++++------------ dev/declustering.html | 2 +- dev/domains.html | 4 +- dev/index.html | 4 +- dev/kriging.html | 2 +- dev/links.html | 2 +- dev/queries.html | 2 +- dev/quickstart.html | 2 +- dev/random/fields.html | 22 ++++---- dev/random/points.html | 16 +++--- dev/resources/ecosystem.html | 2 +- dev/resources/education.html | 2 +- dev/resources/publications.html | 2 +- dev/search.html | 2 +- dev/transforms.html | 92 ++++++++++++++++---------------- dev/validation.html | 4 +- dev/variography/empirical.html | 2 +- dev/variography/fitting.html | 2 +- dev/variography/theoretical.html | 2 +- dev/visualization.html | 2 +- 24 files changed, 122 insertions(+), 122 deletions(-) diff --git a/dev/about/citing.html b/dev/about/citing.html index b5017204..b219221c 100644 --- a/dev/about/citing.html +++ b/dev/about/citing.html @@ -12,4 +12,4 @@ url={https://dx.doi.org/10.21105/joss.00692}, year={2018}, month={Apr} -} +} diff --git a/dev/about/community.html b/dev/about/community.html index 6b272082..cb664436 100644 --- a/dev/about/community.html +++ b/dev/about/community.html @@ -1,2 +1,2 @@ -Community · GeoStats.jl

We use the Zulip platform to chat and help the community of users. Consider creating an account and pressing ? on the keyboard there for navigation instructions.

Click on the image to join the channel:

Zulip

+Community · GeoStats.jl

We use the Zulip platform to chat and help the community of users. Consider creating an account and pressing ? on the keyboard there for navigation instructions.

Click on the image to join the channel:

Zulip

diff --git a/dev/about/license.html b/dev/about/license.html index 2820449e..0d3d1470 100644 --- a/dev/about/license.html +++ b/dev/about/license.html @@ -19,4 +19,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. diff --git a/dev/contributing.html b/dev/contributing.html index f1806d65..1f478757 100644 --- a/dev/contributing.html +++ b/dev/contributing.html @@ -1,3 +1,3 @@ Contributing · GeoStats.jl

Contributing

First off, thank you for considering contributing to GeoStats.jl. It’s people like you that make this project so much fun. Below are a few suggestions to speed up the collaboration process:

  • Please be polite, we are here to help and learn from each other.
  • Try to explain your contribution with simple language.
  • References to textbooks and papers are always welcome.
  • Follow the coding standards in the source.

How to start contributing?

Contributing to an open-source project for the very first time can be a very daunting task. To make the process easier and more GitHub-beginner-friendly, the community has written an article about how to start contributing to open-source and overcome the mental and technical barriers that come associated with it. The article will also take you through the steps required to make your first contribution in detail.

Reporting issues

If you are experiencing issues or have discovered a bug, please report it on GitHub. To make the resolution process easier, please include the version of Julia and GeoStats.jl in your writeup. These can be found with two commands:

julia> versioninfo()
-julia> using Pkg; Pkg.status()

Feature requests

If you have suggestions of improvement or algorithms that you would like to see implemented, please open an issue on GitHub. Suggestions as well as feature requests are very welcome.

Code contribution

If you have code that you would like to contribute that is awesome! Please open an issue or reach out in our community channel before you create the pull request on GitHub so that we make sure your idea is aligned with the project goals.

After your idea is revised by project maintainers, you implement it online on Github or offline on your machine.

Online changes

If the changes to the code are minimal, we recommend pressing . on the keyboard on any file in the GitHub repository of interest. This will open the VSCode editor on the web browser where you can implement the changes, commit them and submit a pull request.

Offline changes

If the changes require additional investigation and tests, please get the development version of the project by typing the following in the package manager:

] activate @geo

This will create a fresh environment called @geo where you can edit the project modules without effects on your global user environment. Next, go ahead and ask the package manager to develop the package of interest (e.g. Variography.jl):

] dev Variography

You can modify the source code that was cloned in the .julia/dev folder and submit a pull request on GitHub later.

+julia> using Pkg; Pkg.status()

Feature requests

If you have suggestions of improvement or algorithms that you would like to see implemented, please open an issue on GitHub. Suggestions as well as feature requests are very welcome.

Code contribution

If you have code that you would like to contribute that is awesome! Please open an issue or reach out in our community channel before you create the pull request on GitHub so that we make sure your idea is aligned with the project goals.

After your idea is revised by project maintainers, you implement it online on Github or offline on your machine.

Online changes

If the changes to the code are minimal, we recommend pressing . on the keyboard on any file in the GitHub repository of interest. This will open the VSCode editor on the web browser where you can implement the changes, commit them and submit a pull request.

Offline changes

If the changes require additional investigation and tests, please get the development version of the project by typing the following in the package manager:

] activate @geo

This will create a fresh environment called @geo where you can edit the project modules without effects on your global user environment. Next, go ahead and ask the package manager to develop the package of interest (e.g. Variography.jl):

] dev Variography

You can modify the source code that was cloned in the .julia/dev folder and submit a pull request on GitHub later.

diff --git a/dev/data.html b/dev/data.html index 7ab673a9..d94ca733 100644 --- a/dev/data.html +++ b/dev/data.html @@ -15,7 +15,7 @@ fig end
plot (generic function with 1 method)

Tables

Consider a table (e.g. DataFrame) with 25 samples of temperature T and pressure P:

using DataFrames
 
-table = DataFrame(T=rand(25), P=rand(25))
25×2 DataFrame
RowTP
Float64Float64
10.9040070.954501
20.776130.433117
30.7347720.376807
40.4211990.170823
50.1098270.103753
60.7352090.286434
70.8426530.121998
80.3087940.612976
90.2805820.391199
100.4087460.733264
110.02378050.260839
120.7044080.531489
130.1589040.938539
140.5857290.55583
150.938370.666134
160.6155190.21959
170.6431020.0499793
180.840360.377699
190.9636230.691838
200.5749890.409256
210.4330460.0343545
220.7850780.609765
230.4746980.601214
240.6053150.305872
250.9509950.773568

We can georeference this table based on a given set of coordinates:

georef(table, PointSet(rand(2,25))) |> plot

or alternatively, georeference it on a 5x5 regular grid (5x5 = 25 samples):

georef(table, CartesianGrid(5, 5)) |> plot

In the first case, the PointSet domain type can be omitted, and the framework will understand that the matrix passed as the second argument contains the coordinates of a point set:

georef(table, rand(2,25))
+table = DataFrame(T=rand(25), P=rand(25))
25×2 DataFrame
RowTP
Float64Float64
10.2509610.428041
20.3643010.0920058
30.4750790.557431
40.6419630.347951
50.3537690.759229
60.2279510.57343
70.8311060.791822
80.205460.0111173
90.7648980.670059
100.4480490.541782
110.2901670.785517
120.6733730.371962
130.5445190.950233
140.6084550.912338
150.1543360.290509
160.5154010.666292
170.1016540.993975
180.2667650.468701
190.2209090.0186985
200.6961150.758392
210.07467670.296321
220.8131780.508086
230.4535830.476548
240.1646120.353302
250.787860.602883

We can georeference this table based on a given set of coordinates:

georef(table, PointSet(rand(2,25))) |> plot

or alternatively, georeference it on a 5x5 regular grid (5x5 = 25 samples):

georef(table, CartesianGrid(5, 5)) |> plot

In the first case, the PointSet domain type can be omitted, and the framework will understand that the matrix passed as the second argument contains the coordinates of a point set:

georef(table, rand(2,25))
@@ -36,54 +36,54 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -94,13 +94,13 @@
25×3 GeoTable over 25 PointSet{2,Float64}
0.9040070.954501(0.210821, 0.310415)0.2509610.428041(0.152036, 0.679924)
0.776130.433117(0.676548, 0.741324)0.3643010.0920058(0.03986, 0.636373)
0.7347720.376807(0.976094, 0.552277)0.4750790.557431(0.217479, 0.912665)
0.4211990.170823(0.487192, 0.185302)0.6419630.347951(0.288106, 0.562549)
0.1098270.103753(0.645956, 0.962711)0.3537690.759229(0.898521, 0.78268)
0.7352090.286434(0.251839, 0.425147)0.2279510.57343(0.022613, 0.31569)
0.8426530.121998(0.966963, 0.0927432)0.8311060.791822(0.0727582, 0.974165)
0.3087940.612976(0.771107, 0.124219)0.205460.0111173(0.725828, 0.608192)
0.2805820.391199(0.363859, 0.912978)0.7648980.670059(0.987174, 0.877494)
0.4087460.733264(0.485656, 0.474498)0.4480490.541782(0.858361, 0.0140663)

Another common pattern in geospatial data is when the coordinates of the samples are already part of the table as columns. In this case, we can specify the column names as symbols:

table = DataFrame(T=rand(25), P=rand(25), X=rand(25), Y=rand(25), Z=rand(25))
 
-georef(table, (:X, :Y, :Z)) |> plot

Arrays

Consider arrays (e.g. images) with data for various geospatial variables. We can georeference these arrays using a named tuple, and the framework will understand that the shape of the arrays should be preserved in a CartesianGrid:

T, P = rand(5,5), rand(5,5)
+georef(table, (:X, :Y, :Z)) |> plot

Arrays

Consider arrays (e.g. images) with data for various geospatial variables. We can georeference these arrays using a named tuple, and the framework will understand that the shape of the arrays should be preserved in a CartesianGrid:

T, P = rand(5,5), rand(5,5)
 
-georef((T=T, P=P)) |> plot

Alternatively, we can interpret the entries of the named tuple as columns in a table:

georef((T=vec(T), P=vec(P)), rand(2,25)) |> plot

Files

We can easily load geospatial data from disk without any specific knowledge of file formats:

using GeoIO
+georef((T=T, P=P)) |> plot

Alternatively, we can interpret the entries of the named tuple as columns in a table:

georef((T=vec(T), P=vec(P)), rand(2,25)) |> plot

Files

We can easily load geospatial data from disk without any specific knowledge of file formats:

using GeoIO
 
 zone = GeoIO.load("data/zone.shp")
 path = GeoIO.load("data/path.shp")
 
 viz(zone.geometry)
 viz!(path.geometry, color = :gray90)
-Mke.current_figure()
+Mke.current_figure() diff --git a/dev/declustering.html b/dev/declustering.html index 8fadf705..35c3fbce 100644 --- a/dev/declustering.html +++ b/dev/declustering.html @@ -4,4 +4,4 @@

The following statistics have geospatial semantics:

Statistics.meanMethod
mean(data, v)
 mean(data, v, s)

Declustered mean of geospatial data. Optionally, specify the variable v and the block side s.

Statistics.varMethod
var(data, v)
 var(data, v, s)

Declustered variance of geospatial data. Optionally, specify the variable v and the block side s.

Statistics.quantileMethod
quantile(data, v, p)
-quantile(data, v, p, s)

Declustered quantile of geospatial data at probability p. Optionally, specify the variable v and the block side s.

A histogram with geospatial semantics is also available where the heights of the bins are adjusted based on the coordinates of the samples:

GeoStatsBase.EmpiricalHistogramType
EmpiricalHistogram(sdata, var, [s]; kwargs...)

Spatial histogram of variable var in spatial data sdata. Optionally, specify the block side s and the keyword arguments kwargs for the fit(Histogram, ...) call.

+quantile(data, v, p, s)

Declustered quantile of geospatial data at probability p. Optionally, specify the variable v and the block side s.

A histogram with geospatial semantics is also available where the heights of the bins are adjusted based on the coordinates of the samples:

GeoStatsBase.EmpiricalHistogramType
EmpiricalHistogram(sdata, var, [s]; kwargs...)

Spatial histogram of variable var in spatial data sdata. Optionally, specify the block side s and the keyword arguments kwargs for the fit(Histogram, ...) call.

diff --git a/dev/domains.html b/dev/domains.html index 6ce7fb88..2493787a 100644 --- a/dev/domains.html +++ b/dev/domains.html @@ -7,11 +7,11 @@ julia> PointSet([1,2,3], [4,5,6]) julia> PointSet([1 4; 2 5; 3 6])
pset = PointSet(rand(3,100))
 
-viz(pset)

GeometrySet

Meshes.GeometrySetType
GeometrySet(geometries)

A set of geometries representing a Domain.

Examples

Set containing two balls centered at (0.0, 0.0) and (1.0, 1.0):

julia> GeometrySet([Ball((0.0, 0.0)), Ball((1.0, 1.0))])
tria = Triangle((0.0, 0.0), (1.0, 1.0), (0.0, 1.0))
+viz(pset)

GeometrySet

Meshes.GeometrySetType
GeometrySet(geometries)

A set of geometries representing a Domain.

Examples

Set containing two balls centered at (0.0, 0.0) and (1.0, 1.0):

julia> GeometrySet([Ball((0.0, 0.0)), Ball((1.0, 1.0))])
tria = Triangle((0.0, 0.0), (1.0, 1.0), (0.0, 1.0))
 quad = Quadrangle((1.0, 1.0), (2.0, 1.0), (2.0, 2.0), (1.0, 2.0))
 gset = GeometrySet([tria, quad])
 
 viz(gset, showfacets = true)

CartesianGrid

Meshes.CartesianGridType
CartesianGrid(dims, origin, spacing)

A Cartesian grid with dimensions dims, lower left corner at origin and cell spacing spacing. The three arguments must have the same length.

CartesianGrid(dims, origin, spacing, offset)

A Cartesian grid with dimensions dims, with lower left corner of element offset at origin and cell spacing spacing.

CartesianGrid(start, finish, dims=dims)

Alternatively, construct a Cartesian grid from a start point (lower left) to a finish point (upper right).

CartesianGrid(start, finish, spacing)

Alternatively, construct a Cartesian grid from a start point to a finish point using a given spacing.

CartesianGrid(dims)
 CartesianGrid(dim1, dim2, ...)

Finally, a Cartesian grid can be constructed by only passing the dimensions dims as a tuple, or by passing each dimension dim1, dim2, ... separately. In this case, the origin and spacing default to (0,0,...) and (1,1,...).

Examples

Create a 3D grid with 100x100x50 hexahedrons:

julia> CartesianGrid(100, 100, 50)

Create a 2D grid with 100 x 100 quadrangles and origin at (10.0, 20.0):

julia> CartesianGrid((100, 100), (10.0, 20.0), (1.0, 1.0))

Create a 1D grid from -1 to 1 with 100 segments:

julia> CartesianGrid((-1.0,), (1.0,), dims=(100,))
grid = CartesianGrid(10, 10, 10)
 
-viz(grid, showfacets = true)
+viz(grid, showfacets = true) diff --git a/dev/index.html b/dev/index.html index 5f37e893..4ca75ff6 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,5 +1,5 @@ -Home · GeoStats.jl
GeoStatsModule

GeoStats.jl

GeoStats.jl is an extensible framework for geospatial data science and geostatistical modeling fully written in Julia. It is comprised of several modules for advanced geometric processing, state-of-the-art geostatistical algorithms and sophisticated visualization of geospatial data.

All further information is provided in the online documentation.

source
Star us on GitHub!

If you have found this software useful, please consider starring it on GitHub. This gives us an accurate lower bound of the (satisfied) user count.

Organizations using the framework:

+Home · GeoStats.jl

GeoStatsModule

GeoStats.jl

GeoStats.jl is an extensible framework for geospatial data science and geostatistical modeling fully written in Julia. It is comprised of several modules for advanced geometric processing, state-of-the-art geostatistical algorithms and sophisticated visualization of geospatial data.

All further information is provided in the online documentation.

source
Star us on GitHub!

If you have found this software useful, please consider starring it on GitHub. This gives us an accurate lower bound of the (satisfied) user count.

Organizations using the framework:

@@ -55,4 +55,4 @@ url={https://dx.doi.org/10.21105/joss.00692}, year={2018}, month={Apr} -}

We ❤ to see our list of publications growing.

+}

We ❤ to see our list of publications growing.

diff --git a/dev/kriging.html b/dev/kriging.html index e51630a2..11383dc9 100644 --- a/dev/kriging.html +++ b/dev/kriging.html @@ -53,4 +53,4 @@ \begin{bmatrix} \g \\ \f -\end{bmatrix}\]

with $\boldsymbol{\nu}$ the Lagrange multipliers associated with the universal constraints. The mean and variance at location $\x_0$ are given by:

\[\mu(\x_0) = \z^\top \l\]

\[\sigma^2(\x_0) = \begin{bmatrix}\g \\ \f\end{bmatrix}^\top \begin{bmatrix}\l \\ \boldsymbol{\nu}\end{bmatrix}\]

GeoStatsModels.UniversalKrigingType
UniversalKriging(γ, degree, dim)

Universal Kriging with variogram model γ and polynomial degree on a geospatial domain of dimension dim.

Notes

External Drift Kriging

In External Drift Kriging, the mean of the random field is assumed to be a combination of known smooth functions:

\[\mu(\x) = \sum_k \beta_k m_k(\x)\]

Differently than Universal Kriging, the functions $m_k$ are not necessarily polynomials of the spatial coordinates. In practice, they represent a list of variables that is strongly correlated (and co-located) with the variable being estimated.

External drifts are known to cause numerical instability. Give preference to other Kriging variants if possible.

GeoStatsModels.ExternalDriftKrigingType
ExternalDriftKriging(γ, drifts)

External Drift Kriging with variogram model γ and external drifts functions.

Notes

  • External drift functions should be smooth
  • Kriging system with external drift is often unstable
  • Include a constant drift (e.g. x->1) for unbiased estimation
  • OrdinaryKriging is recovered for drifts = [x->1]
  • For polynomial mean, see UniversalKriging
+\end{bmatrix}\]

with $\boldsymbol{\nu}$ the Lagrange multipliers associated with the universal constraints. The mean and variance at location $\x_0$ are given by:

\[\mu(\x_0) = \z^\top \l\]

\[\sigma^2(\x_0) = \begin{bmatrix}\g \\ \f\end{bmatrix}^\top \begin{bmatrix}\l \\ \boldsymbol{\nu}\end{bmatrix}\]

GeoStatsModels.UniversalKrigingType
UniversalKriging(γ, degree, dim)

Universal Kriging with variogram model γ and polynomial degree on a geospatial domain of dimension dim.

Notes

External Drift Kriging

In External Drift Kriging, the mean of the random field is assumed to be a combination of known smooth functions:

\[\mu(\x) = \sum_k \beta_k m_k(\x)\]

Differently than Universal Kriging, the functions $m_k$ are not necessarily polynomials of the spatial coordinates. In practice, they represent a list of variables that is strongly correlated (and co-located) with the variable being estimated.

External drifts are known to cause numerical instability. Give preference to other Kriging variants if possible.

GeoStatsModels.ExternalDriftKrigingType
ExternalDriftKriging(γ, drifts)

External Drift Kriging with variogram model γ and external drifts functions.

Notes

  • External drift functions should be smooth
  • Kriging system with external drift is often unstable
  • Include a constant drift (e.g. x->1) for unbiased estimation
  • OrdinaryKriging is recovered for drifts = [x->1]
  • For polynomial mean, see UniversalKriging
diff --git a/dev/links.html b/dev/links.html index 7109104a..855fe284 100644 --- a/dev/links.html +++ b/dev/links.html @@ -1,2 +1,2 @@ -Index · GeoStats.jl

Index

Below is the list of types and functions mentioned in the documentation.

Types

Functions

+Index · GeoStats.jl

Index

Below is the list of types and functions mentioned in the documentation.

Types

Functions

diff --git a/dev/queries.html b/dev/queries.html index cfe6bb8f..44b570e5 100644 --- a/dev/queries.html +++ b/dev/queries.html @@ -32,4 +32,4 @@ geojoin(gtb1, gtb2, :a => mean, :b => std) geojoin(gtb1, gtb2, "a" => mean, pred=issubset) geojoin(gtb1, gtb2, on=:a) -geojoin(gtb1, gtb2, kind=:inner, on=["a", "b"]) +geojoin(gtb1, gtb2, kind=:inner, on=["a", "b"]) diff --git a/dev/quickstart.html b/dev/quickstart.html index 9358329a..a962fd99 100644 --- a/dev/quickstart.html +++ b/dev/quickstart.html @@ -288,4 +288,4 @@

Scientific visualization

We note that the prediction of a geostatistical learning model is a geospatial data object, and we can inspect it with the same methods already described above. This also means that we can visualize the prediction directly, side by side with the true label in this synthetic example:

fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], Ω̂t.geometry, color = Ω̂t.crop)
 viz(fig[1,2], Ωt.geometry, color = Ωt.crop)
-fig

With this example we conclude the basic workflow. To get familiar with other features of the project, please check the the reference guide.

+fig

With this example we conclude the basic workflow. To get familiar with other features of the project, please check the the reference guide.

diff --git a/dev/random/fields.html b/dev/random/fields.html index f194fe37..e00ce12a 100644 --- a/dev/random/fields.html +++ b/dev/random/fields.html @@ -16,18 +16,18 @@ N° reals: 100

We can visualize the first two realizations:

fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], real[1].geometry, color = real[1].Z)
 viz(fig[1,2], real[2].geometry, color = real[2].Z)
-fig

the mean and variance:

m, v = mean(real), var(real)
+fig

the mean and variance:

m, v = mean(real), var(real)
 
 fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], m.geometry, color = m.Z)
 viz(fig[1,2], v.geometry, color = v.Z)
-fig

or the 25th and 75th percentiles:

q25 = quantile(real, 0.25)
+fig

or the 25th and 75th percentiles:

q25 = quantile(real, 0.25)
 q75 = quantile(real, 0.75)
 
 fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], q25.geometry, color = q25.Z)
 viz(fig[1,2], q75.geometry, color = q75.Z)
-fig

All field processes can generate realizations in parallel using multiple Julia processes. Doing so requires using the Distributed standard library, like in the following example:

using Distributed
+fig

All field processes can generate realizations in parallel using multiple Julia processes. Doing so requires using the Distributed standard library, like in the following example:

using Distributed
 
 # request additional processes
 addprocs(3)
@@ -58,7 +58,7 @@
 fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], real[1].geometry, color = real[1].Z)
 viz(fig[1,2], real[2].geometry, color = real[2].Z)
-fig
GeoStatsProcesses.LindgrenProcessType
LindgrenProcess(range=1.0, sill=1.0)

Lindgren process with given range (correlation length) and sill (total variance) as described in Lindgren 2011.

The process relies relies on a discretization of the Laplace-Beltrami operator on meshes and is adequate for highly curved domains (e.g. surfaces).

References

External

The following processes are available in external packages.

ImageQuilting.jl

GeoStatsProcesses.QuiltingProcessType
QuiltingProcess(trainimg, tilesize; [paramaters])

Image quilting process with training image trainimg and tile size tilesize as described in Hoffimann et al. 2017.

Parameters

  • overlap - Overlap size (default to (1/6, 1/6, ..., 1/6))
  • path - Process path (:raster (default), :dilation, or :random)
  • inactive - Vector of inactive voxels (i.e. CartesianIndex) in the grid
  • soft - A pair (data,dataTI) of geospatial data objects (default to nothing)
  • tol - Initial relaxation tolerance in (0,1] (default to 0.1)
  • init - Data initialization method (default to NearestInit())

References

using ImageQuilting
+fig
GeoStatsProcesses.LindgrenProcessType
LindgrenProcess(range=1.0, sill=1.0)

Lindgren process with given range (correlation length) and sill (total variance) as described in Lindgren 2011.

The process relies relies on a discretization of the Laplace-Beltrami operator on meshes and is adequate for highly curved domains (e.g. surfaces).

References

External

The following processes are available in external packages.

ImageQuilting.jl

GeoStatsProcesses.QuiltingProcessType
QuiltingProcess(trainimg, tilesize; [paramaters])

Image quilting process with training image trainimg and tile size tilesize as described in Hoffimann et al. 2017.

Parameters

  • overlap - Overlap size (default to (1/6, 1/6, ..., 1/6))
  • path - Process path (:raster (default), :dilation, or :random)
  • inactive - Vector of inactive voxels (i.e. CartesianIndex) in the grid
  • soft - A pair (data,dataTI) of geospatial data objects (default to nothing)
  • tol - Initial relaxation tolerance in (0,1] (default to 0.1)
  • init - Data initialization method (default to NearestInit())

References

using ImageQuilting
 using GeoArtifacts
 
 # domain of interest
@@ -74,7 +74,7 @@
 fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], real[1].geometry, color = real[1].facies)
 viz(fig[1,2], real[2].geometry, color = real[2].facies)
-fig
# domain of interest
+fig
# domain of interest
 grid = CartesianGrid(200, 200)
 
 # quilting process
@@ -87,7 +87,7 @@
 fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], real[1].geometry, color = real[1].Z)
 viz(fig[1,2], real[2].geometry, color = real[2].Z)
-fig
# domain of interest
+fig
# domain of interest
 grid = domain(img)
 
 # pre-existing observations
@@ -103,7 +103,7 @@
 fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], real[1].geometry, color = real[1].facies)
 viz(fig[1,2], real[2].geometry, color = real[2].facies)
-fig

Voxels marked with the special symbol NaN are treated as inactive. The algorithm will skip tiles that only contain inactive voxels to save computation and will generate realizations that are consistent with the mask. This is particularly useful with complex 3D models that have large inactive portions.

# domain of interest
+fig

Voxels marked with the special symbol NaN are treated as inactive. The algorithm will skip tiles that only contain inactive voxels to save computation and will generate realizations that are consistent with the mask. This is particularly useful with complex 3D models that have large inactive portions.

# domain of interest
 grid = domain(img)
 
 # skip circle at the center
@@ -124,7 +124,7 @@
 fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], real[1].geometry, color = real[1].facies)
 viz(fig[1,2], real[2].geometry, color = real[2].facies)
-fig

It is possible to incorporate auxiliary variables to guide the selection of patterns from the training image.

using ImageFiltering
+fig

It is possible to incorporate auxiliary variables to guide the selection of patterns from the training image.

using ImageFiltering
 
 # image assumed as ground truth (unknown)
 truth = GeoArtifacts.image("WalkerLakeTruth")
@@ -151,7 +151,7 @@
 fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], real[1].geometry, color = real[1].Z)
 viz(fig[1,2], real[2].geometry, color = real[2].Z)
-fig

TuringPatterns.jl

GeoStatsProcesses.TuringProcessType
TuringProcess(; [paramaters])

Turing process as described in Turing 1952.

Parameters

  • params - basic parameters (default to nothing)
  • blur - blur algorithm (default to nothing)
  • edge - edge condition (default to nothing)
  • iter - number of iterations (default to 100)

References

using TuringPatterns
+fig

TuringPatterns.jl

GeoStatsProcesses.TuringProcessType
TuringProcess(; [paramaters])

Turing process as described in Turing 1952.

Parameters

  • params - basic parameters (default to nothing)
  • blur - blur algorithm (default to nothing)
  • edge - edge condition (default to nothing)
  • iter - number of iterations (default to 100)

References

using TuringPatterns
 
 # domain of interest
 grid = CartesianGrid(200, 200)
@@ -162,7 +162,7 @@
 fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], real[1].geometry, color = real[1].z)
 viz(fig[1,2], real[2].geometry, color = real[2].z)
-fig

StratiGraphics.jl

GeoStatsProcesses.StrataProcessType
StrataProcess(environment; [paramaters])

Strata process with given geological environment as described in Hoffimann 2018.

Parameters

  • state - Initial geological state
  • stack - Stacking scheme (:erosional or :depositional)
  • nepochs - Number of epochs (default to 10)

References

using StratiGraphics
+fig

StratiGraphics.jl

GeoStatsProcesses.StrataProcessType
StrataProcess(environment; [paramaters])

Strata process with given geological environment as described in Hoffimann 2018.

Parameters

  • state - Initial geological state
  • stack - Stacking scheme (:erosional or :depositional)
  • nepochs - Number of epochs (default to 10)

References

using StratiGraphics
 
 # domain of interest
 grid = CartesianGrid(50, 50, 20)
@@ -179,4 +179,4 @@
 fig = Mke.Figure(size = (800, 400))
 viz(fig[1,1], real[1].geometry, color = real[1].z)
 viz(fig[1,2], real[2].geometry, color = real[2].z)
-fig
+fig diff --git a/dev/random/points.html b/dev/random/points.html index 2c10bdf2..4805fc95 100644 --- a/dev/random/points.html +++ b/dev/random/points.html @@ -14,7 +14,7 @@ viz!(fig[1,1], pset[1], color = :black) viz(fig[1,2], sphere) viz!(fig[1,2], pset[2], color = :black) -fig
GeoStatsProcesses.ishomogeneousFunction
ishomogeneous(process::PointProcess)

Tells whether or not the spatial point process process is homogeneous.

Processes

GeoStatsProcesses.BinomialProcessType
BinomialProcess(n)

A Binomial point process with n points.

# geometry of interest
+fig
GeoStatsProcesses.ishomogeneousFunction
ishomogeneous(process::PointProcess)

Tells whether or not the spatial point process process is homogeneous.

Processes

GeoStatsProcesses.BinomialProcessType
BinomialProcess(n)

A Binomial point process with n points.

# geometry of interest
 box = Box((0, 0), (100, 100))
 
 # Binomial process
@@ -28,7 +28,7 @@
 viz!(fig[1,1], pset[1], color = :black)
 viz(fig[1,2], box)
 viz!(fig[1,2], pset[2], color = :black)
-fig
GeoStatsProcesses.PoissonProcessType
PoissonProcess(λ)

A Poisson process with intensity λ. For a homogeneous process, define λ as a constant real value, while for an inhomogeneous process, define λ as a function or vector of values. If λ is a vector, it is assumed that the process is associated with a Domain with the same number of elements as λ.

# geometry of interest
+fig
GeoStatsProcesses.PoissonProcessType
PoissonProcess(λ)

A Poisson process with intensity λ. For a homogeneous process, define λ as a constant real value, while for an inhomogeneous process, define λ as a function or vector of values. If λ is a vector, it is assumed that the process is associated with a Domain with the same number of elements as λ.

# geometry of interest
 box = Box((0, 0), (100, 100))
 
 # intensity function
@@ -49,7 +49,7 @@
 viz!(fig[1,1], pset₁, color = :black)
 viz(fig[1,2], box)
 viz!(fig[1,2], pset₂, color = :black)
-fig
GeoStatsProcesses.InhibitionProcessType
InhibitionProcess(δ)

An inhibition point process with minimum distance δ.

# geometry of interest
+fig
GeoStatsProcesses.InhibitionProcessType
InhibitionProcess(δ)

An inhibition point process with minimum distance δ.

# geometry of interest
 box = Box((0, 0), (100, 100))
 
 # inhibition process
@@ -63,7 +63,7 @@
 viz!(fig[1,1], pset[1], color = :black)
 viz(fig[1,2], box)
 viz!(fig[1,2], pset[2], color = :black)
-fig
GeoStatsProcesses.ClusterProcessType
ClusterProcess(proc, ofun)

A cluster process with parent process proc and offsprings generated with ofun. It is a function that takes a parent point and returns a point pattern from another point process.

ClusterProcess(proc, offs, gfun)

Alternatively, specify the parent process proc, the offspring process offs and the geometry function gfun. It is a function that takes a parent point and returns a geometry or domain for the offspring process.

# geometry of interest
+fig
GeoStatsProcesses.ClusterProcessType
ClusterProcess(proc, ofun)

A cluster process with parent process proc and offsprings generated with ofun. It is a function that takes a parent point and returns a point pattern from another point process.

ClusterProcess(proc, offs, gfun)

Alternatively, specify the parent process proc, the offspring process offs and the geometry function gfun. It is a function that takes a parent point and returns a geometry or domain for the offspring process.

# geometry of interest
 box = Box((0, 0), (5, 5))
 
 # Matérn process
@@ -88,7 +88,7 @@
 viz!(fig[1,1], pset₁, color = :black)
 viz(fig[1,2], box)
 viz!(fig[1,2], pset₂, color = :black)
-fig

Operations

Base.unionMethod
p₁ ∪ p₂

Return the union of point processes p₁ and p₂.

# geometry of interest
+fig

Operations

Base.unionMethod
p₁ ∪ p₂

Return the union of point processes p₁ and p₂.

# geometry of interest
 box = Box((0, 0), (100, 100))
 
 # superposition of two Binomial processes
@@ -103,7 +103,7 @@
 viz!(fig[1,1], pset[1], color = :black)
 viz(fig[1,2], box)
 viz!(fig[1,2], pset[2], color = :black)
-fig
GeoStatsProcesses.thinFunction
thin(process, method)

Thin spatial point process with thinning method.

GeoStatsProcesses.RandomThinningType
RandomThinning(p)

Random thinning with retention probability p, which can be a constant probability value in [0,1] or a function mapping a point to a probability.

Examples

RandomThinning(0.5)
+fig
GeoStatsProcesses.RandomThinningType
RandomThinning(p)

Random thinning with retention probability p, which can be a constant probability value in [0,1] or a function mapping a point to a probability.

Examples

RandomThinning(0.5)
 RandomThinning(p -> sum(coordinates(p)))
# geometry of interest
 box = Box((0, 0), (100, 100))
 
@@ -120,7 +120,7 @@
 viz!(fig[1,1], pset₁, color = :black)
 viz(fig[1,2], box)
 viz!(fig[1,2], pset₂, color = :black)
-fig
# geometry of interest
+fig
# geometry of interest
 box = Box((0, 0), (100, 100))
 
 # Binomial process
@@ -137,4 +137,4 @@
 viz!(fig[1,1], pset₁, color = :black)
 viz(fig[1,2], box)
 viz!(fig[1,2], pset₂, color = :black)
-fig
+fig diff --git a/dev/resources/ecosystem.html b/dev/resources/ecosystem.html index 0221b4d9..ba992a58 100644 --- a/dev/resources/ecosystem.html +++ b/dev/resources/ecosystem.html @@ -1,4 +1,4 @@ Ecosystem · GeoStats.jl

Ecosystem

The Julia ecosystem for geospatial modeling is maturing very quickly as the result of multiple initiatives such as JuliaEarth, JuliaClimate, and JuliaGeo. Each of these initiatives is associated with a different set of challenges that ultimatively determine the types of packages that are being developed in the corresponding GitHub organizations. In this section, we try to clarify what is available to first-time users of the language.

-

JuliaEarth

Originally created to host the GeoStats.jl framework, this initiative is primarily concerned with geospatial data science and geostatistical modeling. Due to the various applications in the subsurface of the Earth, most of our Julia packages were developed to work efficiently with both 2D and 3D geometries.

Unlike other initiatives, JuliaEarth is 100% Julia by design. This means that we do not rely on external libraries such as GDAL or Proj4 for geospatial work.

JuliaClimate

The most recent of the three initiatives, JuliaClimate has been created to address specific challenges in climate modeling. One of these challenges is access to climate data in Julia. Packages such as INMET.jl and CDSAPI.jl serve this purpose and are quite nice to work with.

JuliaGeo

Focused on bringing well-established external libraries to Julia, JuliaGeo provides packages that are widely used by geospatial communities from other programming languages. GDAL.jl, Proj4.jl and LibGEOS.jl are good examples of such packages.

+

JuliaEarth

Originally created to host the GeoStats.jl framework, this initiative is primarily concerned with geospatial data science and geostatistical modeling. Due to the various applications in the subsurface of the Earth, most of our Julia packages were developed to work efficiently with both 2D and 3D geometries.

Unlike other initiatives, JuliaEarth is 100% Julia by design. This means that we do not rely on external libraries such as GDAL or Proj4 for geospatial work.

JuliaClimate

The most recent of the three initiatives, JuliaClimate has been created to address specific challenges in climate modeling. One of these challenges is access to climate data in Julia. Packages such as INMET.jl and CDSAPI.jl serve this purpose and are quite nice to work with.

JuliaGeo

Focused on bringing well-established external libraries to Julia, JuliaGeo provides packages that are widely used by geospatial communities from other programming languages. GDAL.jl, Proj4.jl and LibGEOS.jl are good examples of such packages.

diff --git a/dev/resources/education.html b/dev/resources/education.html index 1226382f..c96347a5 100644 --- a/dev/resources/education.html +++ b/dev/resources/education.html @@ -1,2 +1,2 @@ -Education · GeoStats.jl

Education

We recommend the following educational resources.

Learning resources

Textbooks

Video lectures

  • Júlio Hoffimann - Video lectures with the GeoStats.jl framework.

  • Edward Isaaks - Video lectures on variography, Kriging and related concepts.

  • Jef Caers - Video lectures on two-point and multiple-point methods.

Workshop material

  • UFMG 2023 [Portuguese] - Geociência de Dados na Mineração, UFMG 2023

  • JuliaEO 2023 [English] - Global Workshop on Earth Observation, AIRCentre 2023

  • CBMina 2021 [Portuguese] - Introução à Geoestatística, CBMina 2021

  • UFMG 2021 [Portuguese] - Introdução à Geoestatística, UFMG 2021

GaussianProcesses.jl

GaussianProcesses.jl - Gaussian process regression and Simple Kriging are essentially two names for the same concept. The derivation of Kriging estimators, however; does not require distributional assumptions. It is a beautiful coincidence that for multivariate Gaussian distributions, Simple Kriging gives the conditional expectation.

KernelFunctions.jl

KernelFunctions.jl - Spatial structure can be represented in many different forms: covariance, variogram, correlogram, etc. Variograms are more general than covariance kernels according to the intrinsic stationary property. This means that there are variogram models with no covariance counterpart. Furthermore, empirical variograms can be easily estimated from the data (in various directions) with an efficient procedure. GeoStats.jl treats variograms as first-class objects.

Interpolations.jl

Interpolations.jl - Kriging and spline interpolation have different purposes, yet these two methods are sometimes listed as competing alternatives. Kriging estimation is about minimizing variance (or estimation error), whereas spline interpolation is about deriving smooth estimators for computer visualization. Kriging is a generalization of splines in which one has the freedom to customize spatial structure based on data. Besides the estimate itself, Kriging also provides the variance map as a function of point patterns.

ScikitLearn.jl

ScikitLearn.jl - Traditional statistical learning relies on core assumptions that do not hold in geospatial settings (fixed support, i.i.d. samples, ...). Geostatistical learning has been introduced recently as an attempt to push the frontiers of statistical learning with geospatial data.

+Education · GeoStats.jl

Education

We recommend the following educational resources.

Learning resources

Textbooks

Video lectures

  • Júlio Hoffimann - Video lectures with the GeoStats.jl framework.

  • Edward Isaaks - Video lectures on variography, Kriging and related concepts.

  • Jef Caers - Video lectures on two-point and multiple-point methods.

Workshop material

  • UFMG 2023 [Portuguese] - Geociência de Dados na Mineração, UFMG 2023

  • JuliaEO 2023 [English] - Global Workshop on Earth Observation, AIRCentre 2023

  • CBMina 2021 [Portuguese] - Introução à Geoestatística, CBMina 2021

  • UFMG 2021 [Portuguese] - Introdução à Geoestatística, UFMG 2021

GaussianProcesses.jl

GaussianProcesses.jl - Gaussian process regression and Simple Kriging are essentially two names for the same concept. The derivation of Kriging estimators, however; does not require distributional assumptions. It is a beautiful coincidence that for multivariate Gaussian distributions, Simple Kriging gives the conditional expectation.

KernelFunctions.jl

KernelFunctions.jl - Spatial structure can be represented in many different forms: covariance, variogram, correlogram, etc. Variograms are more general than covariance kernels according to the intrinsic stationary property. This means that there are variogram models with no covariance counterpart. Furthermore, empirical variograms can be easily estimated from the data (in various directions) with an efficient procedure. GeoStats.jl treats variograms as first-class objects.

Interpolations.jl

Interpolations.jl - Kriging and spline interpolation have different purposes, yet these two methods are sometimes listed as competing alternatives. Kriging estimation is about minimizing variance (or estimation error), whereas spline interpolation is about deriving smooth estimators for computer visualization. Kriging is a generalization of splines in which one has the freedom to customize spatial structure based on data. Besides the estimate itself, Kriging also provides the variance map as a function of point patterns.

ScikitLearn.jl

ScikitLearn.jl - Traditional statistical learning relies on core assumptions that do not hold in geospatial settings (fixed support, i.i.d. samples, ...). Geostatistical learning has been introduced recently as an attempt to push the frontiers of statistical learning with geospatial data.

diff --git a/dev/resources/publications.html b/dev/resources/publications.html index 6cb6e7a1..75c96055 100644 --- a/dev/resources/publications.html +++ b/dev/resources/publications.html @@ -1,2 +1,2 @@ -Publications · GeoStats.jl
+Publications · GeoStats.jl
diff --git a/dev/search.html b/dev/search.html index c4a488c4..e3b27965 100644 --- a/dev/search.html +++ b/dev/search.html @@ -1,2 +1,2 @@ -Search · GeoStats.jl

Loading search...

    +Search · GeoStats.jl

    Loading search...

      diff --git a/dev/transforms.html b/dev/transforms.html index ba1dbd27..ca5ef890 100644 --- a/dev/transforms.html +++ b/dev/transforms.html @@ -99,13 +99,13 @@ Ω = georef(tab, dom) # describe features -describe(values(Ω))
      3×7 DataFrame
      Rowvariablemeanminmedianmaxnmissingeltype
      SymbolFloat64Float64Float64Float64Int64DataType
      1a0.4975510.0001606680.4958650.997860Float64
      2b-0.00766354-3.18469-0.01387243.260490Float64
      3c0.5093480.0001394160.5201690.9981970Float64

      We can create a pipeline that transforms the features to their normal quantile (or scores):

      pipe = Quantile()
      +describe(values(Ω))
      3×7 DataFrame
      Rowvariablemeanminmedianmaxnmissingeltype
      SymbolFloat64Float64Float64Float64Int64DataType
      1a0.497976.48832e-50.5065210.999650Float64
      2b-0.0436818-2.92595-0.04954713.218940Float64
      3c0.5167990.0006809760.516220.9996850Float64

      We can create a pipeline that transforms the features to their normal quantile (or scores):

      pipe = Quantile()
       
       Ω̄, cache = apply(pipe, Ω)
       
       describe(values(Ω̄))
      3×7 DataFrame
      Rowvariablemeanminmedianmaxnmissingeltype
      SymbolFloat64Float64Float64Float64Int64DataType
      1a0.00309023-3.090230.001253323.090230Float64
      2b0.00309023-3.090230.001253323.090230Float64
      3c0.00309023-3.090230.001253323.090230Float64

      We can then revert the transform given any new geospatial data in the transformed sample space:

      Ωₒ = revert(pipe, Ω̄, cache)
       
      -describe(values(Ωₒ))
      3×7 DataFrame
      Rowvariablemeanminmedianmaxnmissingeltype
      SymbolFloat64Float64Float64Float64Int64DataType
      1a0.4980460.0005694190.4960860.9950930Float64
      2b-0.00474921-2.85364-0.01073952.99780Float64
      3c0.5098560.0008480040.5212820.9970640Float64

      The Learn transform is another important transform from StatsLearnModels.jl:

      StatsLearnModels.LearnType
      Learn(train, model, incols => outcols)

      Fits the statistical learning model using the input columns, selected by incols, and the output columns, selected by outcols, from the train table.

      The column selection can be a single column identifier (index or name), a collection of identifiers or a regular expression (regex).

      Examples

      Learn(train, model, [1, 2, 3] => "d")
      +describe(values(Ωₒ))
      3×7 DataFrame
      Rowvariablemeanminmedianmaxnmissingeltype
      SymbolFloat64Float64Float64Float64Int64DataType
      1a0.4984660.0002469730.5081610.9975410Float64
      2b-0.0410752-2.74573-0.04783722.943180Float64
      3c0.5173140.001632910.5164380.9984470Float64

      The Learn transform is another important transform from StatsLearnModels.jl:

      StatsLearnModels.LearnType
      Learn(train, model, incols => outcols)

      Fits the statistical learning model using the input columns, selected by incols, and the output columns, selected by outcols, from the train table.

      The column selection can be a single column identifier (index or name), a collection of identifiers or a regular expression (regex).

      Examples

      Learn(train, model, [1, 2, 3] => "d")
       Learn(train, model, [:a, :b, :c] => :d)
       Learn(train, model, ["a", "b", "c"] => 4)
       Learn(train, model, [1, 2, 3] => [:d, :e])
      @@ -120,7 +120,7 @@
       fig = Mke.Figure(size = (800, 400))
       viz(fig[1,1], Ω.geometry, color = Ω.Z)
       viz(fig[1,2], Ωr.geometry, color = Ωr.Z)
      -fig

      Geostatistical transforms

      Bellow is the current list of transforms that operate on both the geometries and features of geospatial data. They are implemented in the GeoStatsBase.jl package.

      UniqueCoords

      GeoStatsTransforms.UniqueCoordsType
      UniqueCoords(var₁ => agg₁, var₂ => agg₂, ..., varₙ => aggₙ)

      Retain locations in data with unique coordinates.

      Duplicates of a variable varᵢ are aggregated with aggregation function aggᵢ. If an aggregation function is not defined for variable varᵢ, the default aggregation function will be used. Default aggregation function is mean for continuous variables and first otherwise.

      Examples

      UniqueCoords(1 => last, 2 => maximum)
      +fig

      Geostatistical transforms

      Bellow is the current list of transforms that operate on both the geometries and features of geospatial data. They are implemented in the GeoStatsBase.jl package.

      UniqueCoords

      GeoStatsTransforms.UniqueCoordsType
      UniqueCoords(var₁ => agg₁, var₂ => agg₂, ..., varₙ => aggₙ)

      Retain locations in data with unique coordinates.

      Duplicates of a variable varᵢ are aggregated with aggregation function aggᵢ. If an aggregation function is not defined for variable varᵢ, the default aggregation function will be used. Default aggregation function is mean for continuous variables and first otherwise.

      Examples

      UniqueCoords(1 => last, 2 => maximum)
       UniqueCoords(:a => first, :b => minimum)
       UniqueCoords("a" => last, "b" => maximum)
      # point set with repeated points
       X = rand(2, 50)
      @@ -142,44 +142,44 @@
         
         
           
      -      0.643511
      -      (0.864798, 0.47712)
      +      0.525116
      +      (0.433571, 0.971037)
           
           
      -      0.303069
      -      (0.245397, 0.262195)
      +      0.201764
      +      (0.648469, 0.756816)
           
           
      -      0.748004
      -      (0.904639, 0.386093)
      +      0.585196
      +      (0.593642, 0.12743)
           
           
      -      0.517875
      -      (0.0896589, 0.205453)
      +      0.30862
      +      (0.410512, 0.466595)
           
           
      -      0.0543266
      -      (0.814275, 0.70423)
      +      0.731104
      +      (0.0773863, 0.807867)
           
           
      -      0.771397
      -      (0.45422, 0.149699)
      +      0.728279
      +      (0.129081, 0.392801)
           
           
      -      0.860045
      -      (0.0740097, 0.405294)
      +      0.375172
      +      (0.192158, 0.625135)
           
           
      -      0.32987
      -      (0.548352, 0.985804)
      +      0.0990386
      +      (0.750371, 0.678016)
           
           
      -      0.190988
      -      (0.0384712, 0.838801)
      +      0.276962
      +      (0.33339, 0.553176)
           
           
      -      0.891418
      -      (0.724129, 0.984668)
      +      0.123564
      +      (0.771776, 0.108085)
           
           
             ⋮
      @@ -206,44 +206,44 @@
         
         
           
      -      0.799683
      -      (0.864798, 0.47712)
      +      0.315853
      +      (0.433571, 0.971037)
           
           
      -      0.479814
      -      (0.245397, 0.262195)
      +      0.188967
      +      (0.648469, 0.756816)
           
           
      -      0.473433
      -      (0.904639, 0.386093)
      +      0.522366
      +      (0.593642, 0.12743)
           
           
      -      0.386491
      -      (0.0896589, 0.205453)
      +      0.650601
      +      (0.410512, 0.466595)
           
           
      -      0.338885
      -      (0.814275, 0.70423)
      +      0.695821
      +      (0.0773863, 0.807867)
           
           
      -      0.843077
      -      (0.45422, 0.149699)
      +      0.411863
      +      (0.129081, 0.392801)
           
           
      -      0.466321
      -      (0.0740097, 0.405294)
      +      0.339307
      +      (0.192158, 0.625135)
           
           
      -      0.519442
      -      (0.548352, 0.985804)
      +      0.22327
      +      (0.750371, 0.678016)
           
           
      -      0.34008
      -      (0.0384712, 0.838801)
      +      0.502158
      +      (0.33339, 0.553176)
           
           
      -      0.754884
      -      (0.724129, 0.984668)
      +      0.522118
      +      (0.771776, 0.108085)
           
           
             ⋮
      @@ -269,7 +269,7 @@ 

      Detrend

      Potrace

      GeoStatsTransforms.PotraceType
      Potrace(mask; [ϵ])
      +fig

      Potrace

      GeoStatsTransforms.PotraceType
      Potrace(mask; [ϵ])
       Potrace(mask, var₁ => agg₁, ..., varₙ => aggₙ; [ϵ])

      Trace polygons on 2D image data with Selinger's Potrace algorithm.

      The categories stored in column mask are converted into binary masks, which are then traced into multi-polygons. When provided, the option ϵ is forwarded to Selinger's simplification algorithm.

      Duplicates of a variable varᵢ are aggregated with aggregation function aggᵢ. If an aggregation function is not defined for variable varᵢ, the default aggregation function will be used. Default aggregation function is mean for continuous variables and first otherwise.

      Examples

      Potrace(:mask, ϵ=0.1)
       Potrace(1, 1 => last, 2 => maximum)
       Potrace(:mask, :a => first, :b => minimum)
      @@ -317,7 +317,7 @@ 

      Detrend

      GeoStatsTransforms.GSCType
      GSC(k, m; σ=1.0, tol=1e-4, maxiter=10, weights=nothing, as=:CLUSTER)

      A transform for partitioning geospatial data into k clusters using Geostatistical Spectral Clustering (GSC).

      Parameters

      • k - Desired number of clusters
      • m - Multiplicative factor for adjacent weights
      • σ - Standard deviation for exponential model (default to 1.0)
      • tol - Tolerance of k-means algorithm (default to 1e-4)
      • maxiter - Maximum number of iterations (default to 10)
      • weights - Dictionary with weights for each attribute (default to nothing)
      • as - Cluster column name

      References

      Notes

      • The algorithm implemented here is slightly different than the algorithm

      described in Romary et al. 2015. Instead of setting Wᵢⱼ = 0 when i <-/-> j, we simply magnify the weight by a multiplicative factor Wᵢⱼ *= m when i <–> j. This leads to dense matrices but also better results in practice.

      𝒞 = Ω |> GSC(50, 2.0)
       
      -viz(𝒞.geometry, color = 𝒞.CLUSTER)
      GeoStatsTransforms.SLICType
      SLIC(k, m; tol=1e-4, maxiter=10, weights=nothing, as=:CLUSTER)

      A transform for clustering geospatial data into approximately k clusters using Simple Linear Iterative Clustering (SLIC). The transform produces clusters of samples that are spatially connected based on a distance dₛ and that, at the same time, are similar in terms of vars with distance dᵥ. The tradeoff is controlled with a hyperparameter parameter m in an additive model dₜ = √(dᵥ² + m²(dₛ/s)²).

      Parameters

      • k - Approximate number of clusters
      • m - Hyperparameter of SLIC model
      • tol - Tolerance of k-means algorithm (default to 1e-4)
      • maxiter - Maximum number of iterations (default to 10)
      • weights - Dictionary with weights for each attribute (default to nothing)
      • as - Cluster column name

      References

      𝒞 = Ω |> SLIC(50, 0.01)
      +viz(𝒞.geometry, color = 𝒞.CLUSTER)
      GeoStatsTransforms.SLICType
      SLIC(k, m; tol=1e-4, maxiter=10, weights=nothing, as=:CLUSTER)

      A transform for clustering geospatial data into approximately k clusters using Simple Linear Iterative Clustering (SLIC). The transform produces clusters of samples that are spatially connected based on a distance dₛ and that, at the same time, are similar in terms of vars with distance dᵥ. The tradeoff is controlled with a hyperparameter parameter m in an additive model dₜ = √(dᵥ² + m²(dₛ/s)²).

      Parameters

      • k - Approximate number of clusters
      • m - Hyperparameter of SLIC model
      • tol - Tolerance of k-means algorithm (default to 1e-4)
      • maxiter - Maximum number of iterations (default to 10)
      • weights - Dictionary with weights for each attribute (default to nothing)
      • as - Cluster column name

      References

      𝒞 = Ω |> SLIC(50, 0.01)
       
       viz(𝒞.geometry, color = 𝒞.CLUSTER)

      Interpolate

      GeoStatsTransforms.InterpolateType
      Interpolate(domain, vars₁ => model₁, ..., varsₙ => modelₙ; [parameters])
       Interpolate([g₁, g₂, ..., gₙ], vars₁ => model₁, ..., varsₙ => modelₙ; [parameters])

      Interpolate geospatial data on given domain or vector of geometries [g₁, g₂, ..., gₙ], using geostatistical models model₁, ..., modelₙ for variables vars₁, ..., varsₙ.

      Interpolate(domain, model=NN(); [parameters])
      @@ -340,4 +340,4 @@ 

      Detrend

      Simulate nreals realizations of variable parent with geostatistical process process, and each child variable varsᵢ with process map procmapᵢ, over given domain.

      The process map must be an iterable of pairs of the form: value => process. Each process in the map is related to a value of the parent realization, therefore the values of the child variables will be chosen according to the values of the corresponding parent realization.

      Parameters

      Examples

      parent = QuiltingProcess(trainimg, (30, 30))
       child0 = GaussianProcess(SphericalVariogram(range=20.0, sill=0.2))
       child1 = GaussianProcess(SphericalVariogram(MetricBall((200.0, 20.0))))
      -transform = CookieCutter(domain, :parent => parent, :child => [0 => child0, 1 => child1])
      +transform = CookieCutter(domain, :parent => parent, :child => [0 => child0, 1 => child1])
      diff --git a/dev/validation.html b/dev/validation.html index 3ed71be0..9cd2b689 100644 --- a/dev/validation.html +++ b/dev/validation.html @@ -24,8 +24,8 @@ # estimate of generalization error ϵ̂ = cverror((model, feats => label), Ωₛ, bcv)
      Dict{Symbol, Float64} with 1 entry:
      -  :crop => 0.226287

      We can unhide the labels in the target domain and compute the actual error for comparison:

      # train in Ωₛ and predict in Ωₜ
      +  :crop => 0.236624

      We can unhide the labels in the target domain and compute the actual error for comparison:

      # train in Ωₛ and predict in Ωₜ
       Ω̂ₜ = Ωₜ |> Learn(Ωₛ, model, feats => label)
       
       # actual error of the model
      -ϵ = mean(loss.(Ωₜ.crop, Ω̂ₜ.crop))
      0.2340478688852246

      Below is the list of currently implemented validation methods.

      Leave-one-out

      Leave-ball-out

      K-fold

      Block

      GeoStatsValidation.BlockValidationType
      BlockValidation(sides; loss=Dict())

      Cross-validation with blocks of given sides. Optionally, specify loss function from LossFunctions.jl for some of the variables. If only one side is provided, then blocks become cubes.

      References

      Weighted

      GeoStatsValidation.WeightedValidationType
      WeightedValidation(weighting, folding; lambda=1.0, loss=Dict())

      An error estimation method which samples are weighted with weighting method and split into folds with folding method. Weights are raised to lambda power in [0,1]. Optionally, specify loss function from LossFunctions.jl for some of the variables.

      References

      Density-ratio

      GeoStatsValidation.DensityRatioValidationType
      DensityRatioValidation(k; [parameters])

      Density ratio validation where weights are first obtained with density ratio estimation, and then used in k-fold weighted cross-validation.

      Parameters

      • shuffle - Shuffle the data before folding (default to true)
      • estimator - Density ratio estimator (default to LSIF())
      • optlib - Optimization library (default to default_optlib(estimator))
      • lambda - Power of density ratios (default to 1.0)

      Please see DensityRatioEstimation.jl for a list of supported estimators.

      References

      +ϵ = mean(loss.(Ωₜ.crop, Ω̂ₜ.crop))
      0.236096537250787

      Below is the list of currently implemented validation methods.

      Leave-one-out

      GeoStatsValidation.LeaveOneOutType
      LeaveOneOut(; loss=Dict())

      Leave-one-out validation. Optionally, specify loss function from LossFunctions.jl for some of the variables.

      References

      Leave-ball-out

      GeoStatsValidation.LeaveBallOutType
      LeaveBallOut(ball; loss=Dict())

      Leave-ball-out (a.k.a. spatial leave-one-out) validation. Optionally, specify loss function from the LossFunctions.jl package for some of the variables.

      LeaveBallOut(radius; loss=Dict())

      By default, use Euclidean ball of given radius in space.

      References

      K-fold

      GeoStatsValidation.KFoldValidationType
      KFoldValidation(k; shuffle=true, loss=Dict())

      k-fold cross-validation. Optionally, shuffle the data, and specify loss function from LossFunctions.jl for some of the variables.

      References

      Block

      GeoStatsValidation.BlockValidationType
      BlockValidation(sides; loss=Dict())

      Cross-validation with blocks of given sides. Optionally, specify loss function from LossFunctions.jl for some of the variables. If only one side is provided, then blocks become cubes.

      References

      Weighted

      GeoStatsValidation.WeightedValidationType
      WeightedValidation(weighting, folding; lambda=1.0, loss=Dict())

      An error estimation method which samples are weighted with weighting method and split into folds with folding method. Weights are raised to lambda power in [0,1]. Optionally, specify loss function from LossFunctions.jl for some of the variables.

      References

      Density-ratio

      GeoStatsValidation.DensityRatioValidationType
      DensityRatioValidation(k; [parameters])

      Density ratio validation where weights are first obtained with density ratio estimation, and then used in k-fold weighted cross-validation.

      Parameters

      • shuffle - Shuffle the data before folding (default to true)
      • estimator - Density ratio estimator (default to LSIF())
      • optlib - Optimization library (default to default_optlib(estimator))
      • lambda - Power of density ratios (default to 1.0)

      Please see DensityRatioEstimation.jl for a list of supported estimators.

      References

      diff --git a/dev/variography/empirical.html b/dev/variography/empirical.html index 8333fdc6..3ab08158 100644 --- a/dev/variography/empirical.html +++ b/dev/variography/empirical.html @@ -25,4 +25,4 @@ fig = Mke.Figure() ax = Mke.PolarAxis(fig[1,1], title = "Varioplane") Mke.plot!(ax, γ) -fig +fig diff --git a/dev/variography/fitting.html b/dev/variography/fitting.html index 9232f6a7..c8145204 100644 --- a/dev/variography/fitting.html +++ b/dev/variography/fitting.html @@ -23,4 +23,4 @@ Mke.plot(g) Mke.plot!(γ, maxlag = 25.) Mke.current_figure()

      Methods

      Weighted least squares

      Variography.WeightedLeastSquaresType
      WeightedLeastSquares()
      -WeightedLeastSquares(w)

      Fit theoretical variogram using weighted least squares with weighting function w (e.g. h -> 1/h). If no weighting function is provided, bin counts of empirical variogram are normalized and used as weights.

      +WeightedLeastSquares(w)

      Fit theoretical variogram using weighted least squares with weighting function w (e.g. h -> 1/h). If no weighting function is provided, bin counts of empirical variogram are normalized and used as weights.

      diff --git a/dev/variography/theoretical.html b/dev/variography/theoretical.html index bacbe678..96e8f8f9 100644 --- a/dev/variography/theoretical.html +++ b/dev/variography/theoretical.html @@ -57,4 +57,4 @@ cₒ # matrix nugget
      2×2 Matrix{Float64}:
        5.0  1.0
      - 1.0  7.0
      c # matrix coefficients
      ([1.0 0.0; 0.0 1.0], [2.0 0.5; 0.5 3.0])
      g # normalized structures
      (GaussianVariogram(sill: 1, nugget: 0, range: 1.0, distance: Euclidean), ExponentialVariogram(sill: 1, nugget: 0, range: 1.0, distance: Euclidean))
      + 1.0 7.0
      c # matrix coefficients
      ([1.0 0.0; 0.0 1.0], [2.0 0.5; 0.5 3.0])
      g # normalized structures
      (GaussianVariogram(sill: 1, nugget: 0, range: 1.0, distance: Euclidean), ExponentialVariogram(sill: 1, nugget: 0, range: 1.0, distance: Euclidean))
      diff --git a/dev/visualization.html b/dev/visualization.html index edf270fa..6a00b351 100644 --- a/dev/visualization.html +++ b/dev/visualization.html @@ -17,4 +17,4 @@ hscatter(fig[1,2], 𝒮, :Z, :Z, lag=20) hscatter(fig[2,1], 𝒮, :Z, :Z, lag=40) hscatter(fig[2,2], 𝒮, :Z, :Z, lag=60) -fig

      PairPlots.jl

      The PairPlots.jl package provides the pairplot function that can be used with any table, including tables of attributes obtained with the values function.

      Biplots.jl

      The Biplot.jl package provides 2D and 3D statistical biplots.

      +fig

      PairPlots.jl

      The PairPlots.jl package provides the pairplot function that can be used with any table, including tables of attributes obtained with the values function.

      Biplots.jl

      The Biplot.jl package provides 2D and 3D statistical biplots.