montecarlo

package module
v0.0.0-...-5f036c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2024 License: GPL-3.0 Imports: 12 Imported by: 4

README

go montecarlo

This go package comtains a variety of Monte Carlo sampling tools I use for hydrologic modelling parameter estimation.

Two basic sampling plans are provided, the Halton digital sequence (Faure and Lemieux, 2008; Lemieux, 2009) and the Latin Hypercube (Lemieux, 2009).

Also included:

A set of distribution transforms that maps the uniform distribution U[0,1) to either:

  • the Johnson bounded with mode m (Law, 2007)
  • generalized trapezoid
  • triangle

A set of joint distribution transforms:

  • Nested distributions (i.e., 0.0 <= u1 <= u2 <= 1.0)
  • Three symmetric and invertable copulae: elliptical, Franks archimedean, diagonal band (from Kurowicka and Cooke, 2006)

dependencies:

References

Faure, H., and C. Lemieux, 2008. Generalized Halton Sequences in 2008: A Comparative Study. 30pp.

Kurowicka, D. and R. Cooke, 2006. Uncertainty Analysis with High Dimensional Dependence Modelling. John Wiley & Sons, Ltd. 284pp.

Law, A.M., 2007. Simulation Modeling and Analysis. McGraw-Hill, fourth ed. New York. 768pp.

Lemieux, C., 2009. Monte Carlo and Quasi-Monte Carlo Sampling. Springer Science. 373pp.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSamples

func GenerateSamples(fun func(u []float64, i int) float64, n, p, nthrd int) ([][]float64, []float64)

GenerateSamples returns the result from n evaluations of fun() sampling from p-hypercube

func GenerateTop

func GenerateTop(fp string, eval func(u []float64, i int) float64, s sampler.Set, nsamples int, minOF float64)

GenerateTop returns nsamples of function evaluations that exceed the minOF

func RankSamples

func RankSamples(f []float64, minimize bool) []int

RankSamples ranks samples accoring to evaluation value

func RankedUnBiased

func RankedUnBiased(fun func(u []float64, i int) float64, n, s, nthrd int) ([][]float64, []float64, []int)

RankedUnBiased returns s n-dimensional samples of fun(), ranking samples accoring to evaluation value

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL