default_fn

pyoptex.doe.cost_optimal.codex.wrapper.default_fn(nsims, factors, cost, metric, Y2X, init=<function init_feasible>, sample=<function sample_random>, temperature=None, accept=<function exponential_accept_rel>, restart=None, insert=<function insert_optimal>, remove=<function remove_optimal_onebyone>, constraints=None, optimizers=[<pyoptex.doe.cost_optimal.codex.optimization.CEOptimizer object>, <pyoptex.doe.cost_optimal.codex.optimization.CEStructOptimizer object>], final_optimizers=[<pyoptex.doe.cost_optimal.codex.optimization.CEOptimizer object>, <pyoptex.doe.cost_optimal.codex.optimization.CEStructOptimizer object>])[source]

Create a functionset with the default operators. Each operator can be manually overriden by providing the parameter.

If any mixture components are present, the mixture constraint is automatically added.

Parameters

nsimsint

The number of simulations for the algorithm.

factorslist(Factor)

The factors of the experiment.

costfunc(Y, params)

The cost function.

metricMetric

The metric object.

Y2Xfunc

The function converting from the design matrix to the model matrix.

initfunc

The initialization function, init_feasible by default.

samplefunc

The sampling function, sample_random by default.

temperatureobj

The temperature object, LinearTemperature by default.

acceptfunc

The acceptance function, exponential_accept_rel by default.

restartobj

The restart object, RestartEveryNFailed by default.

insertfunc

The insertion function, insert_optimal by default.

removefunc

The removal function, remove_optimal_onebyone by default.

constraintsfunc

The constraints function, no_constraints by default.

optimizerslist(Optimizer)

A list of optimizers. If None, it defaults to CEOptimizer and CEStructOptimizer. To provide no optimizers, pass an empty list.

final_optimizerslist(Optimizer)

Similar to optimizers, but run at the very end of the algorithm to perform the final optimizations. These optimizers are run until no improvements are found.

Returns

fnFunctionSet

The function set.