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

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.MeanL1CostFunction
All Implemented Interfaces:
Evaluator<Evaluator<? super Vector,? extends Vector>,Double>, CostFunction<Evaluator<? super Vector,? extends Vector>,Collection<? extends InputOutputPair<? extends Vector,Vector>>>, 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

public class MeanL1CostFunction
extends AbstractSupervisedCostFunction<Vector,Vector>

Cost function that evaluates the mean 1-norm error (absolute value of difference) weighted by a sample "weight" that is embedded in each sample. A derived class is used by the Daimler project.

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

Constructor Summary
MeanL1CostFunction()
          Default constructor
MeanL1CostFunction(Collection<? extends InputOutputPair<? extends Vector,Vector>> dataset)
          Creates a new instance of MeanL1CostFunction
 
Method Summary
 MeanL1CostFunction clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 Double evaluatePerformance(Collection<? extends TargetEstimatePair<? extends Vector,? extends Vector>> data)
          Evaluates the performance accuracy of the given estimates against the given targets.
 
Methods inherited from class gov.sandia.cognition.learning.function.cost.AbstractSupervisedCostFunction
evaluate, 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.performance.PerformanceEvaluator
evaluatePerformance
 

Constructor Detail

MeanL1CostFunction

public MeanL1CostFunction()
Default constructor


MeanL1CostFunction

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

Parameters:
dataset - Underlying set of data, with weights for each sample, that will be used to evaluate the vectorFunction
Method Detail

clone

public MeanL1CostFunction clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface CostFunction<Evaluator<? super Vector,? extends Vector>,Collection<? extends InputOutputPair<? extends Vector,Vector>>>
Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class AbstractSupervisedCostFunction<Vector,Vector>
Returns:
A clone of this object.

evaluatePerformance

public Double evaluatePerformance(Collection<? extends TargetEstimatePair<? extends Vector,? extends Vector>> data)
Description copied from interface: SupervisedPerformanceEvaluator
Evaluates the performance accuracy of the given estimates against the given targets.

Specified by:
evaluatePerformance in interface SupervisedPerformanceEvaluator<Vector,Vector,Vector,Double>
Specified by:
evaluatePerformance in class AbstractSupervisedCostFunction<Vector,Vector>
Parameters:
data - The target-estimate pairs to use to evaluate performance.
Returns:
The performance evaluation result.