gov.sandia.cognition.learning.function.cost
Class SumSquaredErrorCostFunction.Cache

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.function.cost.SumSquaredErrorCostFunction.Cache
All Implemented Interfaces:
CloneableSerializable, Serializable, Cloneable
Enclosing class:
SumSquaredErrorCostFunction

public static class SumSquaredErrorCostFunction.Cache
extends AbstractCloneableSerializable

Caches often-used values for the Cost Function

See Also:
Serialized Form

Field Summary
 Matrix J
          Jacobian
 Vector Jte
          Jacobian transpose times Error: J.transpose().times( error )
 Matrix JtJ
          Inner-product of the Jacobian matrix: J.transpose().times( J )
 double parameterCost
          Cost-function value of the parameter set
 
Constructor Summary
protected SumSquaredErrorCostFunction.Cache(Matrix J, Matrix JtJ, Vector Jte, double parameterCost)
          Creates a new instance of Cache
 
Method Summary
static SumSquaredErrorCostFunction.Cache compute(GradientDescendable objectToOptimize, Collection<? extends InputOutputPair<? extends Vector,Vector>> data)
          Computes often-used parameters of a sum-squared error term
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

J

public final Matrix J
Jacobian


JtJ

public final Matrix JtJ
Inner-product of the Jacobian matrix: J.transpose().times( J )


Jte

public final Vector Jte
Jacobian transpose times Error: J.transpose().times( error )


parameterCost

public final double parameterCost
Cost-function value of the parameter set

Constructor Detail

SumSquaredErrorCostFunction.Cache

protected SumSquaredErrorCostFunction.Cache(Matrix J,
                                            Matrix JtJ,
                                            Vector Jte,
                                            double parameterCost)
Creates a new instance of Cache

Parameters:
J - Jacobian
JtJ - Inner-product of the Jacobian matrix: J.transpose().times( J )
Jte - Jacobian transpose times Error: J.transpose().times( error )
parameterCost - Cost-function value of the parameter set
Method Detail

compute

public static SumSquaredErrorCostFunction.Cache compute(GradientDescendable objectToOptimize,
                                                        Collection<? extends InputOutputPair<? extends Vector,Vector>> data)
Computes often-used parameters of a sum-squared error term

Parameters:
objectToOptimize - GradientDescendable to compute the statistics of
data - Dataset to consider
Returns:
Cache containing the cached cost-function parameters