|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.sandia.cognition.util.AbstractCloneableSerializable
gov.sandia.cognition.learning.function.vector.GeneralizedLinearModel
gov.sandia.cognition.learning.function.vector.DifferentiableGeneralizedLinearModel
public class DifferentiableGeneralizedLinearModel
A GradientDescenable version of a GeneralizedLinearModel, in other words, a GeneralizedLinearModel where the squashing function is differentiable
Constructor Summary | |
---|---|
DifferentiableGeneralizedLinearModel()
Default Constructor. |
|
DifferentiableGeneralizedLinearModel(DifferentiableGeneralizedLinearModel other)
Creates a new instance of DifferentiableGeneralizedLinearModel |
|
DifferentiableGeneralizedLinearModel(int numInputs,
int numOutputs,
DifferentiableUnivariateScalarFunction scalarFunction)
Creates a new instance of GeneralizedLinearModel |
|
DifferentiableGeneralizedLinearModel(MultivariateDiscriminant matrixMultiply,
DifferentiableUnivariateScalarFunction scalarSquashingFunction)
Creates a new instance of DifferentiableGeneralizedLinearModel |
|
DifferentiableGeneralizedLinearModel(MultivariateDiscriminant matrixMultiply,
DifferentiableVectorFunction squashingFunction)
Creates a new instance of DifferentiableGeneralizedLinearModel |
Method Summary | |
---|---|
DifferentiableGeneralizedLinearModel |
clone()
This makes public the clone method on the Object class and
removes the exception that it throws. |
Matrix |
computeParameterGradient(Vector input)
Computes the derivative of the function about the input with respect to the parameters of the function |
Matrix |
differentiate(Vector input)
Differentiate the VectorFunction at input and return
the Jacobian |
DifferentiableVectorFunction |
getSquashingFunction()
Getter for squashingFunction |
Methods inherited from class gov.sandia.cognition.learning.function.vector.GeneralizedLinearModel |
---|
convertFromVector, convertToVector, evaluate, getDiscriminant, getInputDimensionality, getOutputDimensionality, setDiscriminant, setSquashingFunction, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface gov.sandia.cognition.evaluator.Evaluator |
---|
evaluate |
Methods inherited from interface gov.sandia.cognition.math.matrix.Vectorizable |
---|
convertFromVector, convertToVector |
Constructor Detail |
---|
public DifferentiableGeneralizedLinearModel()
public DifferentiableGeneralizedLinearModel(int numInputs, int numOutputs, DifferentiableUnivariateScalarFunction scalarFunction)
numInputs
- Number of inputs of the function (number of matrix columns)numOutputs
- Number of outputs of the function (number of matrix rows)scalarFunction
- Function to apply to each outputpublic DifferentiableGeneralizedLinearModel(MultivariateDiscriminant matrixMultiply, DifferentiableVectorFunction squashingFunction)
matrixMultiply
- GradientDescendable that multiplies an input by the internal matrixsquashingFunction
- VectorFunction that is applied to the output of the matrix multiplypublic DifferentiableGeneralizedLinearModel(MultivariateDiscriminant matrixMultiply, DifferentiableUnivariateScalarFunction scalarSquashingFunction)
matrixMultiply
- GradientDescendable that multiplies an input by the internal matrixscalarSquashingFunction
- scalar function that is applied to the output of the matrix multiplypublic DifferentiableGeneralizedLinearModel(DifferentiableGeneralizedLinearModel other)
other
- DifferentiableGeneralizedLinearModel to copyMethod Detail |
---|
public DifferentiableVectorFunction getSquashingFunction()
GeneralizedLinearModel
getSquashingFunction
in class GeneralizedLinearModel
public Matrix computeParameterGradient(Vector input)
GradientDescendable
computeParameterGradient
in interface GradientDescendable
computeParameterGradient
in interface ParameterGradientEvaluator<Vector,Matrix>
input
- Point about which to differentiate w.r.t. the parameters
public DifferentiableGeneralizedLinearModel clone()
AbstractCloneableSerializable
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.
clone
in interface GradientDescendable
clone
in interface Vectorizable
clone
in interface VectorizableVectorFunction
clone
in interface CloneableSerializable
clone
in class GeneralizedLinearModel
public Matrix differentiate(Vector input)
DifferentiableVectorFunction
input
and return
the Jacobian
differentiate
in interface DifferentiableEvaluator<Vector,Vector,Matrix>
differentiate
in interface DifferentiableVectorFunction
input
- Vector input to the VectorFunction, about which to evaluate
the VectorFunction
input
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |