CENormalSampler

class CENormalSampler(val problemDefinition: ProblemDefinition, meanSmoother: Double = defaultMeanSmoother, sdSmoother: Double = defaultStdDevSmoother, coefficientOfVariationThreshold: Double = defaultCoefficientOfVariationThreshold, streamNum: Int = 0, val streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider) : CESamplerIfc(source)

Constructors

Link copied to clipboard
constructor(problemDefinition: ProblemDefinition, meanSmoother: Double = defaultMeanSmoother, sdSmoother: Double = defaultStdDevSmoother, coefficientOfVariationThreshold: Double = defaultCoefficientOfVariationThreshold, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = KSLRandom.DefaultRNStreamProvider)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

This threshold represents the bound used to consider whether the coefficient of variation for the population parameters has converged.

Link copied to clipboard
open override val dimension: Int

the expected size of the array from sample()

Link copied to clipboard

A list of statistics for the population within the last sample of elites.

Link copied to clipboard

This can be used to increase/decrease the variability associated with the initial parameter setting. For example, a value of 1.1 increases the starting standard deviation by 10%. The setting must be a positive value. The default value is specified by defaultInitialVariabilityFactor.

Link copied to clipboard

A copy of the current mean parameters.

Link copied to clipboard

Used to smooth the estimated values of the mean parameters via exponential smoothing.

Link copied to clipboard

The problem definition associated with the sampling process.

Link copied to clipboard
open override val rnStream: RNStreamIfc

rnStream provides a reference to the underlying stream of random numbers.

Link copied to clipboard

Used to smooth the estimated values of the standard deviation parameters via exponential smoothing.

Link copied to clipboard

A copy of the current standard deviation parameters.

Link copied to clipboard

Computes the standard deviation thresholds used to check if the distribution has converged. These values are abs(mean)*cvThreshold

Link copied to clipboard
open override val streamNumber: Int

The assigned stream number for the generation process

Link copied to clipboard

The stream provider associated with the sampling process.

Functions

Link copied to clipboard
open override fun hasConverged(): Boolean

The sampler is considered to be converged if the component standard deviations are less than their standard deviation thresholds based on the coefficient of variation threshold.

Link copied to clipboard
open override fun initializeParameters(values: DoubleArray)

This function sets the initial mean and standard deviation parameters for the sampler. The mean values are specified by the supplied array. The initial standard deviation values are set based on the range of the input values associated with the problem. If the range of possible values is higher, then the initial standard deviation is higher. The range is used to approximate the standard deviation. The initialVariabilityFactor can be used to inflate or deflate this setting as needed.

Link copied to clipboard
open override fun parameters(): DoubleArray
Link copied to clipboard
open override fun sample(array: DoubleArray)

Returns a sample from the current cross-entropy distribution.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
open override fun updateParameters(elites: List<DoubleArray>)

The underlying parameters of the sampling mechanism should be updated. Implementors need to handle the edge case of less than 2 elites.