reconstruct_pattern_hetero: reconstruct_pattern_hetero

Description Usage Arguments Details Value References See Also Examples

View source: R/reconstruct_pattern_hetero.R

Description

Pattern reconstruction for heterogenous patterns

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
reconstruct_pattern_hetero(
  pattern,
  n_random = 1,
  e_threshold = 0.01,
  max_runs = 1000,
  no_change = Inf,
  annealing = 0.01,
  comp_fast = 1000,
  weights = c(0.5, 0.5),
  r_length = 250,
  return_input = TRUE,
  simplify = FALSE,
  verbose = TRUE,
  plot = FALSE
)

Arguments

pattern

ppp.

n_random

Number of randomizations.

e_threshold

Minimum energy to stop reconstruction.

max_runs

Maximum number of iterations of e_threshold is not reached.

no_change

Reconstrucction will stop if energy does not decrease for this number of iterations.

annealing

Probability to keep relocated point even if energy did not decrease.

comp_fast

If pattern contains more points than threshold, summary functions are estimated in a computational fast way.

weights

Weights used to calculate energy. The first number refers to Gest(r), the second number to pcf(r).

r_length

Number of intervals from r = 0 to r = rmax the summary functions are evaluated.

return_input

The original input data is returned as last list entry

simplify

If n_random = 1 and return_input = FALSE only pattern will be returned.

verbose

Print progress report.

plot

Plot pcf function during optimization.

Details

The functions randomizes the observed pattern by using pattern reconstruction as described in Tscheschel & Stoyan (2006) and Wiegand & Moloney (2014). The algorithm starts with a random but heterogenous pattern, shifts a point to a new location and keeps the change only, if the deviation between the observed and the reconstructed pattern decreases. The pair correlation function and the nearest neighbour distance function are used to describe the patterns.

For large patterns (n > comp_fast) the pair correlation function can be estimated from Ripley's K-function without edge correction. This decreases the computational time. For more information see estimate_pcf_fast.

The reconstruction can be stopped automatically if for n steps the energy does not decrease. The number of steps can be controlled by no_change and is set to no_change = Inf as default to never stop automatically.

The weights must be 0 < sum(weights) <= 1. To weight both summary functions identical, use weights = c(0.5, 0.5).

spatstat sets r_length to 513 by default. However, a lower value decreases the computational time while increasing the "bumpiness" of the summary function.

Value

list

References

Tscheschel, A., & Stoyan, D. (2006). Statistical reconstruction of random point patterns. Computational Statistics and Data Analysis, 51(2), 859-871.

Wiegand, T., & Moloney, K. A. (2014). Handbook of spatial point-pattern analysis in ecology. Boca Raton: Chapman and Hall/CRC Press.

See Also

calculate_energy
plot_randomized_pattern reconstruct_pattern_homo
reconstruct_pattern_cluster
reconstruct_pattern_marks

Examples

1
2
3
4
5
6
## Not run: 
input_pattern <- spatstat::rpoispp(lambda = function(x, y) {100 * exp(-3 * x)}, nsim = 1)

pattern_recon <- reconstruct_pattern_hetero(input_pattern, n_random = 19, max_runs = 1000)

## End(Not run)

mhesselbarth/SHAR documentation built on Oct. 17, 2020, 8:58 p.m.