DisplayVariogram - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Interpolation[Kriging]

  

DisplayVariogram

  

display the empirical variogram of the data from a Kriging object

 

Calling Sequence

Parameters

Description

Examples

Compatibility

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.)

• 

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.

• 

bounds=b0,b1,...,bn means values from the set of distances will be divided into n bins: from b0 to b1, from b1 to b2, etc. Values less than b0 or greater than 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 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 b0,b1,...,bn, you can also use a Vector with the same entries. This has the same effect.

• 

bounds=quantilesq0,q1,...,qn or bounds=decilesd0,d1,...,dn or bounds=percentilesp0,p1,...,pn or bounds=quartilesq0,q1,...,qn 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 bounds=percentiles0,25,60,90 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 bounds=quantiles0,0.25,0.6,0.9 using the notion of Quantile instead of Percentile, or bounds=deciles0,2.5,6,9 using Deciles, or bounds=quartiles0,1,2.4,3.6 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

points,dataInterpolation:-Kriging:-GenerateSpatialDataSpherical1,10,1

kInterpolation:-Krigingpoints,data

kKrⅈgⅈng ⅈntⅇrpolatⅈon obȷⅇct wⅈth 30 samplⅇ poⅈntsVarⅈogram: Sphⅇrⅈcal(1.25259453854486,13.6487615617241,.5525536774)

(1)

SetVariogramk,Spherical1,10,1

Krⅈgⅈng ⅈntⅇrpolatⅈon obȷⅇct wⅈth 30 samplⅇ poⅈntsVarⅈogram: Sphⅇrⅈcal(1,10,1)

(2)

DisplayVariogramk

DisplayVariogramk,output=:-smoothed

DisplayVariogramk,output=:-groupedpoints

DisplayVariogramk,output=:-violinplots

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.

points,dataInterpolation:-Kriging:-GenerateSpatialDataWave0,10,2,grid,dimension=3

kInterpolation:-Krigingpoints,data

kKrⅈgⅈng ⅈntⅇrpolatⅈon obȷⅇct wⅈth 27 samplⅇ poⅈntsVarⅈogram: Sphⅇrⅈcal(3.48579343065617,40.05654896768,1.)

(3)

SetVariogramk,Wave0,10,2

Krⅈgⅈng ⅈntⅇrpolatⅈon obȷⅇct wⅈth 27 samplⅇ poⅈntsVarⅈogram: Wavⅇ(0,10,2)

(4)

DisplayVariogramk

DisplayVariogramk,output=:-smoothed

DisplayVariogramk,output=:-groupedpoints

DisplayVariogramk,output=:-violinplots

Compatibility

• 

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

• 

For more information on Maple 2018 changes, see Updates in Maple 2018.

See Also

Constructor

Interpolating at a point

Kriging

SetVariogram