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.
- metric
Metric The metric object.
- Y2Xfunc
The function converting from the design matrix to the model matrix.
- initfunc
The initialization function,
init_feasibleby default.- samplefunc
The sampling function,
sample_randomby default.- temperatureobj
The temperature object,
LinearTemperatureby default.- acceptfunc
The acceptance function,
exponential_accept_relby default.- restartobj
The restart object,
RestartEveryNFailedby default.- insertfunc
The insertion function,
insert_optimalby default.- removefunc
The removal function,
remove_optimal_onebyoneby default.- constraintsfunc
The constraints function,
no_constraintsby default.- optimizerslist(
Optimizer) A list of optimizers. If None, it defaults to
CEOptimizerandCEStructOptimizer. 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
- fn
FunctionSet The function set.