gov.sandia.cognition.learning.function.cost
Class AbstractParallelizableCostFunction

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.performance.AbstractSupervisedPerformanceEvaluator<InputType,TargetType,TargetType,Double>
          extended by gov.sandia.cognition.learning.function.cost.AbstractSupervisedCostFunction<Vector,Vector>
              extended by gov.sandia.cognition.learning.function.cost.AbstractParallelizableCostFunction
All Implemented Interfaces:
Evaluator<Evaluator<? super Vector,? extends Vector>,Double>, CostFunction<Evaluator<? super Vector,? extends Vector>,Collection<? extends InputOutputPair<? extends Vector,Vector>>>, DifferentiableCostFunction, ParallelizableCostFunction, SupervisedCostFunction<Vector,Vector>, PerformanceEvaluator<Evaluator<? super Vector,? extends Vector>,Collection<? extends InputOutputPair<Vector,Vector>>,Double>, SupervisedPerformanceEvaluator<Vector,Vector,Vector,Double>, CloneableSerializable, Summarizer<TargetEstimatePair<? extends Vector,? extends Vector>,Double>, Serializable, Cloneable
Direct Known Subclasses:
SumSquaredErrorCostFunction

public abstract class AbstractParallelizableCostFunction
extends AbstractSupervisedCostFunction<Vector,Vector>
implements ParallelizableCostFunction

Partial implementation of the ParallelizableCostFunction

Since:
2.1
Author:
Kevin R. Dixon
See Also:
Serialized Form

Constructor Summary
AbstractParallelizableCostFunction(Collection<? extends InputOutputPair<? extends Vector,Vector>> costParameters)
          Creates a new instance of AbstractParallelizableCostFunction
 
Method Summary
 Vector computeParameterGradient(GradientDescendable function)
          Differentiates function with respect to its parameters.
 Double evaluate(Evaluator<? super Vector,? extends Vector> evaluator)
          Computes the cost of the given target.
 
Methods inherited from class gov.sandia.cognition.learning.function.cost.AbstractSupervisedCostFunction
clone, evaluatePerformance, getCostParameters, setCostParameters, summarize
 
Methods inherited from class gov.sandia.cognition.learning.performance.AbstractSupervisedPerformanceEvaluator
evaluatePerformance
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.learning.function.cost.ParallelizableCostFunction
computeParameterGradientAmalgamate, computeParameterGradientPartial, evaluateAmalgamate, evaluatePartial
 
Methods inherited from interface gov.sandia.cognition.learning.function.cost.CostFunction
clone, getCostParameters, setCostParameters
 
Methods inherited from interface gov.sandia.cognition.util.Summarizer
summarize
 
Methods inherited from interface gov.sandia.cognition.learning.performance.SupervisedPerformanceEvaluator
evaluatePerformance
 
Methods inherited from interface gov.sandia.cognition.learning.performance.PerformanceEvaluator
evaluatePerformance
 

Constructor Detail

AbstractParallelizableCostFunction

public AbstractParallelizableCostFunction(Collection<? extends InputOutputPair<? extends Vector,Vector>> costParameters)
Creates a new instance of AbstractParallelizableCostFunction

Parameters:
costParameters - Dataset to use
Method Detail

evaluate

public Double evaluate(Evaluator<? super Vector,? extends Vector> evaluator)
Description copied from interface: CostFunction
Computes the cost of the given target.

Specified by:
evaluate in interface Evaluator<Evaluator<? super Vector,? extends Vector>,Double>
Specified by:
evaluate in interface CostFunction<Evaluator<? super Vector,? extends Vector>,Collection<? extends InputOutputPair<? extends Vector,Vector>>>
Overrides:
evaluate in class AbstractSupervisedCostFunction<Vector,Vector>
Parameters:
evaluator - The object to evaluate.
Returns:
The cost of the given object.

computeParameterGradient

public Vector computeParameterGradient(GradientDescendable function)
Description copied from interface: DifferentiableCostFunction
Differentiates function with respect to its parameters.

Specified by:
computeParameterGradient in interface DifferentiableCostFunction
Parameters:
function - The object to differentiate.
Returns:
Derivatives of the object with respect to the cost function.