Click or drag to resize

CrossEntropyProgramSample Method

Draws a sample having the specified size from a distribution defined in the given context and characterized by the designated parameter.

Namespace:  Novacta.Analytics.Advanced
Assembly:  Novacta.Analytics (in Novacta.Analytics.dll) Version: 2.0.0
Syntax
protected DoubleMatrix Sample(
	CrossEntropyContext context,
	int sampleSize,
	DoubleMatrix parameter
)

Parameters

context
Type: Novacta.Analytics.AdvancedCrossEntropyContext
The context in which the method must be executed.
sampleSize
Type: SystemInt32
The sample size.
parameter
Type: Novacta.AnalyticsDoubleMatrix
The sampling parameter.

Return Value

Type: DoubleMatrix
The matrix containing the sample data.
Exceptions
ExceptionCondition
ArgumentNullExceptioncontext is null.
-or-
parameter is null.
ArgumentOutOfRangeExceptionsampleSize is not positive.
ArgumentException The dimensions of parameter do not match those of the InitialParameter of context.
Remarks

This method executes the sampling step of a Cross-Entropy program.

Method Sample returns a DoubleMatrix whose rows represent the generated sample points, while its NumberOfColumns is the StateDimension of the points in the specified context. This is equivalent to require that a state of the system under study must be representable by a row vector.

See Also