CompositionFunctionApproximator¶
Contents¶
Overview¶
A CompositionFunctionApproximator is an abstract subclass of Composition that, over calls to its adapt
method, parameterizes its function
to predict the
net_outcome
of the Composition (or part of one) controlled by an
OptimizationControlMechanism, for a given set of state_feature_values
and a control_allocation
provided by the OptimizationControlMechanism. Its evaluate
method calls
its function
to generate and return the predicted net_outcome
for a given set of state_feature_values
, control_allocation
,
num_estimates
, and num_trials_per_estimate
.
Class Reference¶
- class psyneulink.core.compositions.compositionfunctionapproximator.CompositionFunctionApproximator(name=None, **param_defaults)¶
Subclass of Composition that implements a FunctionApproximator as the
agent_rep
of an OptimizationControlMechanism.Parameterizes
its function
to predict anet_outcome
for a set ofstate_feature_values
and acontrol_allocation
provided by an OptimizationControlMechanism.See Composition for additional arguments and attributes.
- Parameters
param_defaults (LearningFunction, function or method) – specifies the function parameterized by the CompositionFunctionApproximator’s
adapt
method, and used by itsevaluate
method to generate and return a predictednet_outcome
for a set ofstate_feature_values
and a control_allocation provided by an OptimizationControlMechanism.
- function¶
parameterized by the CompositionFunctionApproximator’s <adapt <CompositionFunctionApproximator.adapt>` method, and used by its
evaluate
method to generate and return a predictednet_outcome
for a set ofstate_feature_values
and a control_allocation provided by an OptimizationControlMechanism.- Type
LearningFunction, function or method
- prediction_parameters¶
parameters adjusted by
adapt
method, and used byfunction
to predict thenet_outcome
for a given set ofstate_feature_values
andcontrol_allocation
.- Type
1d array
- adapt(feature_values, control_allocation, net_outcome, context=None)¶
Adjust parameters of
function
to improve prediction oftarget
frominput
.
- evaluate(feature_values, control_allocation, num_estimates, num_trials_per_estimate, base_context=<psyneulink.core.globals.context.Context object>, context=None)¶
Return
target
predicted byfunction
.