Learn R Programming

spMC (version 0.3.4)

quench: Conditional Simulation Adjuster Via Quenching Algorithm

Description

The function adjusts a simulated random field generated by the sim function.

Usage

quench(x, data, coords, sim, GA = FALSE, optype = c("param", 
       "fullprobs", "semiprobs", "coordprobs"), max.it = 1000,
       knn = 12)

Arguments

Value

A data frame containing the simulation grid, the simulated random field, predicted values and the approximated probabilities.

Rdversion

1.1

Details

This method perform a simulated annealing or a genetic algorithm to modify the simulation results, in order to reduce artifacts effects. In practice, each simulated configuration is adjusted to reach a pattern similar to the observed sample data. There are several objective functions for this purpose, by setting optype equal to "param" the optimization is performed through parametric methods. The alternatives "fullprobs" and "semiprobs" are based on transition probabilities computed among simulation points, while the option "coordprobs" is based on transition probabilities calculated among observation and simulation points.

This procedure should be executed by setting max.it equal at least to the simulation grid size, or its multiples.

References

Carle, S. F., Fogg, G. E. (1996) Transition Probability-Based Indicator Geostatistics. Mathematical Geosciences, 28(4), 453-476.

Carle, S. F. (1999) T-PROGS: Transition Probability Geostatistical Software. University of California, Davis.

Sartore, L. (2010) Geostatistical models for 3-D data. M.Phil. thesis, Ca' Foscari University of Venice. Weise, T. (2009) Global Optimization Algorithms - Theory and Application. http://www.it-weise.de/.

See Also

sim_ck, sim_ik, sim_mcs, sim_path

Examples

Run this code
data(ACM)

# Model parameters estimation for the
# multinomial categorical simulation
x <- multi_tpfit(ACM$MAT5, ACM[, 1:3])

# Generate the simulation grid
mygrid <- list()
mygrid$X <- seq(min(ACM$X), max(ACM$X), length = 20)
mygrid$Y <- seq(min(ACM$Y), max(ACM$Y), length = 20)
mygrid$Z <- -40 * 0:9 - 1
mygrid <- as.matrix(expand.grid(mygrid$X, mygrid$Y, mygrid$Z))

# Simulate the random field through
# Ordinary Indicator Kriging algorithm
myOIKSim <- sim_ik(x, ACM$MAT5, ACM[, 1:3], mygrid)
 
# Perform the quenching algorithm 
# to adjust simulation
quench(x, ACM$MAT5, ACM[, 1:3], myOIKSim, optype = "coordprobs",
       max.it = 8000, knn = 12)

Run the code above in your browser using DataLab