 DisplayVariogram - Maple Help

Interpolation[Kriging]

 DisplayVariogram
 display the empirical variogram of the data from a Kriging object Calling Sequence DisplayVariogram(k, options) Parameters

 k - a Kriging object options - (optional) keyword options of the form output=format, bounds=b, and/or variogram=m Description

 • The DisplayVariogram command can be used to produce different visualizations of the empirical variogram for a given set of data; that is, the set of distances between pairs of points and the associated absolute differences in value.
 • By default, every pair of data points has its distance and absolute difference in values calculated, and each [distance, difference] pair is plotted, together with the curve of the selected variogram.
 • You can specify a different type of output using the keyword option output = format:
 – If format is pointplot, the default output described above is selected.
 – If format is points, then a list of the [distance, difference] pairs corresponding to each pair of points will be returned instead of a plot of those points.
 – If format is smoothed, then the curve given by the set of [distance, difference] pairs is smoothed by the Lowess algorithm (with bandwidth=1/3), then plotted in the relevant range.
 – If format is groupedpoints, then the set of [distance, difference] pairs is sorted in order of increasing distance, split into subsets of size 10, and each subset has its average distance and absolute difference in values calculated and plotted.
 – If format is lists, then the sequence distances, differences will be returned instead of a plot, where distances is a list of point distances and differences is a list of absolute differences in value. distances[i] corresponds to differences[i], but otherwise the lists are in no particular order.
 – If format is violinplots then the data is grouped and a set of violin plots are plotted.
 – If format is bins then the data is grouped and a list of matrices is returned. The first column of each matrix corresponds to the distances falling in that bin, and the second column holds the distances.
 By default, ten bins of equal width are used. Other options can be used by specifying the bounds option as described below.  These are the same options available in the SplitByColumn command, except with a different default value, and the value none is not allowed. (The bounds option has no effect if format = bins is not specified.)
 • $\mathrm{bounds}=n$ for a positive integer n means values from the set of distances will be divided into n bins of equal width. The default value for bounds is bounds = 10.
 • $\mathrm{bounds}=\left[\mathrm{b0},\mathrm{b1},\mathrm{...},\mathrm{bn}\right]$ means values from the set of distances will be divided into $n$ bins: from $\mathrm{b0}$ to $\mathrm{b1}$, from $\mathrm{b1}$ to $\mathrm{b2}$, etc. Values less than $\mathrm{b0}$ or greater than $\mathrm{bn}$, and the rows containing them, are discarded.
 These intervals are closed on the left and open on the right; that is, if the exact value $\mathrm{b1}$ occurs in the data, then that row goes into the second matrix, not the first one. The rightmost bin is an exception: it represents an interval closed on both sides.
 Instead of using a list $\left[\mathrm{b0},\mathrm{b1},\mathrm{...},\mathrm{bn}\right]$, you can also use a Vector with the same entries. This has the same effect.
 • $\mathrm{bounds}=\mathrm{quantiles}\left(\mathrm{q0},\mathrm{q1},\mathrm{...},\mathrm{qn}\right)$ or $\mathrm{bounds}=\mathrm{deciles}\left(\mathrm{d0},\mathrm{d1},\mathrm{...},\mathrm{dn}\right)$ or $\mathrm{bounds}=\mathrm{percentiles}\left(\mathrm{p0},\mathrm{p1},\mathrm{...},\mathrm{pn}\right)$ or $\mathrm{bounds}=\mathrm{quartiles}\left(\mathrm{q0},\mathrm{q1},\mathrm{...},\mathrm{qn}\right)$ are equivalent ways of specifying bins similar to specifying a list, but instead of specifying absolute numbers for the bounds, you specify which fraction of the data should fall in each of the bins.
 For example, specifying $\mathrm{bounds}=\mathrm{percentiles}\left(0,25,60,90\right)$ specifies three bins, the first of which contains the lowest 25% of data, then then next 60% - 25% = 35% of data, and finally the following 90% - 60% = 30% of data. That is, the bounds are at the 0th, 25th, 60th, and 90th Percentile of the data in the set of distances. This could also be specified as $\mathrm{bounds}=\mathrm{quantiles}\left(0,0.25,0.6,0.9\right)$ using the notion of Quantile instead of Percentile, or $\mathrm{bounds}=\mathrm{deciles}\left(0,2.5,6,9\right)$ using Deciles, or $\mathrm{bounds}=\mathrm{quartiles}\left(0,1,2.4,3.6\right)$ using Quartiles.
 • By default, the variogram used is the one set in the Kriging object. If the variogram = m option is set, then this is overridden and the variogram m is used instead. If the model is specified but the parameters are not given, then the parameters will be automatically set to the result of FitVariogramParameters.
 • The variogram option is ignored if output is lists or points. Examples

 > $\mathrm{points},\mathrm{data}≔\mathrm{Interpolation}:-\mathrm{Kriging}:-\mathrm{GenerateSpatialData}\left(\mathrm{Spherical}\left(1,10,1\right)\right)$ > $k≔\mathrm{Interpolation}:-\mathrm{Kriging}\left(\mathrm{points},\mathrm{data}\right)$
 ${k}{≔}\left(\begin{array}{c}{Kriging intⅇrpolation obȷⅇct with 30 samplⅇ points}\\ {Variogram: Sphⅇrical\left(1.25259453854486,13.6487615617241,.5525536774\right)}\end{array}\right)$ (1)
 > $\mathrm{SetVariogram}\left(k,\mathrm{Spherical}\left(1,10,1\right)\right)$
 $\left(\begin{array}{c}{Kriging intⅇrpolation obȷⅇct with 30 samplⅇ points}\\ {Variogram: Sphⅇrical\left(1,10,1\right)}\end{array}\right)$ (2)
 > $\mathrm{DisplayVariogram}\left(k\right)$ > $\mathrm{DisplayVariogram}\left(k,\mathrm{output}=':-\mathrm{smoothed}'\right)$ > $\mathrm{DisplayVariogram}\left(k,\mathrm{output}=':-\mathrm{groupedpoints}'\right)$ > $\mathrm{DisplayVariogram}\left(k,\mathrm{output}=':-\mathrm{violinplots}'\right)$ If the points are in a grid, as is the case when we use the grid option to GenerateSpatialData, then the distances between points will have clearly visible patterns in them.

 > $\mathrm{points},\mathrm{data}≔\mathrm{Interpolation}:-\mathrm{Kriging}:-\mathrm{GenerateSpatialData}\left(\mathrm{Wave}\left(0,10,2\right),\mathrm{grid},\mathrm{dimension}=3\right)$ > $k≔\mathrm{Interpolation}:-\mathrm{Kriging}\left(\mathrm{points},\mathrm{data}\right)$
 ${k}{≔}\left(\begin{array}{c}{Kriging intⅇrpolation obȷⅇct with 27 samplⅇ points}\\ {Variogram: Sphⅇrical\left(3.48579343065617,40.05654896768,1.\right)}\end{array}\right)$ (3)
 > $\mathrm{SetVariogram}\left(k,\mathrm{Wave}\left(0,10,2\right)\right)$
 $\left(\begin{array}{c}{Kriging intⅇrpolation obȷⅇct with 27 samplⅇ points}\\ {Variogram: Wavⅇ\left(0,10,2\right)}\end{array}\right)$ (4)
 > $\mathrm{DisplayVariogram}\left(k\right)$ > $\mathrm{DisplayVariogram}\left(k,\mathrm{output}=':-\mathrm{smoothed}'\right)$ > $\mathrm{DisplayVariogram}\left(k,\mathrm{output}=':-\mathrm{groupedpoints}'\right)$ > $\mathrm{DisplayVariogram}\left(k,\mathrm{output}=':-\mathrm{violinplots}'\right)$  Compatibility

 • The Interpolation[Kriging][DisplayVariogram] command was introduced in Maple 2018.