Class GaussianProposalFunction
- java.lang.Object
-
- dev.nm.analysis.function.rn2rm.AbstractRealVectorFunction
-
- dev.nm.stat.random.rng.multivariate.mcmc.proposalfunction.ProposalFunction
-
- dev.nm.stat.random.rng.multivariate.mcmc.proposalfunction.GaussianProposalFunction
-
- All Implemented Interfaces:
Function<Vector,Vector>
,RealVectorFunction
- Direct Known Subclasses:
HybridMCMCProposalFunction
public class GaussianProposalFunction extends ProposalFunction
A proposal generator where each perturbation is a random vector, where each element is drawn from a standard Normal distribution, multiplied by a scale matrix.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface dev.nm.analysis.function.Function
Function.EvaluationException
-
-
Constructor Summary
Constructors Constructor Description GaussianProposalFunction(double[] sigma, RandomLongGenerator uniform)
Constructs a Gaussian proposal function.GaussianProposalFunction(double sigma, int size, RandomLongGenerator uniform)
Constructs a Gaussian proposal function.GaussianProposalFunction(Matrix scale, RandomLongGenerator uniform)
Constructs a Gaussian proposal function.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector
evaluate(Vector x)
Evaluate the function f at x, where x is from the domain.-
Methods inherited from class dev.nm.analysis.function.rn2rm.AbstractRealVectorFunction
dimensionOfDomain, dimensionOfRange
-
-
-
-
Constructor Detail
-
GaussianProposalFunction
public GaussianProposalFunction(Matrix scale, RandomLongGenerator uniform)
Constructs a Gaussian proposal function.- Parameters:
scale
- the scale matrix by which to multiply the standard Normal vectoruniform
- a RandomLongGenerator
-
GaussianProposalFunction
public GaussianProposalFunction(double[] sigma, RandomLongGenerator uniform)
Constructs a Gaussian proposal function. The scale matrix is a diagonal matrix, where the elements along the diagonal correspond to the given vector.- Parameters:
sigma
- the standard deviations of the individual variablesuniform
- a RandomLongGenerator
-
GaussianProposalFunction
public GaussianProposalFunction(double sigma, int size, RandomLongGenerator uniform)
Constructs a Gaussian proposal function. The scale matrix is the identity matrix multiplied by the given constant, sigma, the standard deviation. The components have no covariance.- Parameters:
sigma
- the standard deviationsize
- the size of proposalsuniform
- a RandomLongGenerator
-
-