# CompositionFunctionApproximator¶

## 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 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 feature_values, control_allocation and num_estimates

## 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 a net_outcome for a set of feature_values and a control_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 its evaluate method to generate and return a predicted net_outcome for a set of feature_values and a control_allocation provided by an OptimizationControlMechanism.
function

LearningFunction, function or method – parameterized by the CompositionFunctionApproximator’s <adapt <CompositionFunctionApproximator.adapt> method, and used by its evaluate method to generate and return a predicted net_outcome for a set of feature_values and a control_allocation provided by an OptimizationControlMechanism.

prediction_parameters

1d array – parameters adjusted by adapt method, and used by function to predict the net_outcome for a given set of feature_values and control_allocation.

adapt(feature_values, control_allocation, net_outcome, context=None)

Adjust parameters of function to improve prediction of target from input.

evaluate(feature_values, control_allocation, num_estimates, base_context=<psyneulink.core.globals.context.Context object>, context=None)

Return target predicted by function`.