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_repof an OptimizationControlMechanism.Parameterizes
its functionto predict anet_outcomefor a set ofstate_feature_valuesand acontrol_allocationprovided 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
adaptmethod, and used by itsevaluatemethod to generate and return a predictednet_outcomefor a set ofstate_feature_valuesand a control_allocation provided by an OptimizationControlMechanism.
- function¶
parameterized by the CompositionFunctionApproximator’s <adapt <CompositionFunctionApproximator.adapt>` method, and used by its
evaluatemethod to generate and return a predictednet_outcomefor a set ofstate_feature_valuesand a control_allocation provided by an OptimizationControlMechanism.- Type:
LearningFunction, function or method
- prediction_parameters¶
parameters adjusted by
adaptmethod, and used byfunctionto predict thenet_outcomefor a given set ofstate_feature_valuesandcontrol_allocation.- Type:
1d array
- adapt(feature_values, control_allocation, net_outcome, context=None)¶
Adjust parameters of
functionto improve prediction oftargetfrominput.
- evaluate(feature_values, control_allocation, num_estimates, num_trials_per_estimate, base_context=<psyneulink.core.globals.context.Context object>, context=None)¶
Return
targetpredicted byfunction.