gov.sandia.cognition.learning.function.cost
Interface CostFunction<EvaluatedType,CostParametersType>

Type Parameters:
EvaluatedType - Class type to evaluate, for example a "Vector" or "Evaluator"
CostParametersType - Class type that parameterizes the CostFunction, for example, a Collection of InputOutputPairs. Usually the dataset we're interested in.
All Superinterfaces:
Cloneable, CloneableSerializable, Evaluator<EvaluatedType,Double>, Serializable
All Known Subinterfaces:
DifferentiableCostFunction, ParallelizableCostFunction, SupervisedCostFunction<InputType,TargetType>
All Known Implementing Classes:
AbstractCostFunction, AbstractParallelizableCostFunction, AbstractSupervisedCostFunction, ClusterDistortionMeasure, EuclideanDistanceCostFunction, KolmogorovSmirnovDivergence, MeanL1CostFunction, MeanSquaredErrorCostFunction, MeanZeroOneErrorEvaluator, NegativeLogLikelihood, ParallelClusterDistortionMeasure, ParallelizedCostFunctionContainer, ParallelNegativeLogLikelihood, SumSquaredErrorCostFunction

@CodeReview(reviewer="Justin Basilico",
            date="2006-10-04",
            changesNeeded=false,
            comments="Interface looks fine.")
public interface CostFunction<EvaluatedType,CostParametersType>
extends Evaluator<EvaluatedType,Double>, CloneableSerializable

The CostFunction interface defines the interface to evaluate some object to determine its cost. The interface defines the ability to get the set of parameters used for the cost function and to set them. This is used to facilitate learning algorithms passing the data to evaluate the cost of a hypothesis on.

Since:
1.0
Author:
Justin Basilico, Kevin R. Dixon

Method Summary
 CostFunction<EvaluatedType,CostParametersType> clone()
          Creates a new clone (shallow copy) of this object.
 Double evaluate(EvaluatedType target)
          Computes the cost of the given target.
 CostParametersType getCostParameters()
          Gets the parameters of the cost function.
 void setCostParameters(CostParametersType costParameters)
          Sets the parameters of the cost function used to evaluate the cost of a target.
 

Method Detail

evaluate

Double evaluate(EvaluatedType target)
Computes the cost of the given target.

Specified by:
evaluate in interface Evaluator<EvaluatedType,Double>
Parameters:
target - The object to evaluate.
Returns:
The cost of the given object.

setCostParameters

void setCostParameters(CostParametersType costParameters)
Sets the parameters of the cost function used to evaluate the cost of a target.

Parameters:
costParameters - The parameters of the cost function.

getCostParameters

CostParametersType getCostParameters()
Gets the parameters of the cost function.

Returns:
The current parameters of the cost function.

clone

CostFunction<EvaluatedType,CostParametersType> clone()
Description copied from interface: CloneableSerializable
Creates a new clone (shallow copy) of this object.

Specified by:
clone in interface CloneableSerializable
Returns:
A new clone (shallow copy) of this object.