View Source CEM.Update (cem v0.1.1)

Update and smooth parameters of the instance-generating probability distribution.

Summary

Functions

Update the parameters from a sample and then smooth based on the previous parameter values.

Types

@type instance() :: any()
@type opts() :: map()
@type params() :: any()
@type smooth_fn() :: (params(), params(), float() -> params())
@type update_fn() :: ([instance()] -> params())

Functions

Link to this function

update_and_smooth(params, sample, update_fn, smooth_fn, opts)

View Source
@spec update_and_smooth(
  params(),
  [instance()],
  update_fn(),
  smooth_fn(),
  opts()
) :: params()

Update the parameters from a sample and then smooth based on the previous parameter values.