public class DifferentiableGeneralizedLinearModel extends GeneralizedLinearModel implements GradientDescendable, DifferentiableVectorFunction
| Constructor and Description |
|---|
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
|
| Modifier and Type | Method and Description |
|---|---|
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
|
convertFromVector, convertToVector, evaluate, getDiscriminant, getInputDimensionality, getOutputDimensionality, setDiscriminant, setSquashingFunction, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitconvertFromVector, convertToVectorpublic 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 copypublic DifferentiableVectorFunction getSquashingFunction()
GeneralizedLinearModelgetSquashingFunction in class GeneralizedLinearModelpublic Matrix computeParameterGradient(Vector input)
GradientDescendablecomputeParameterGradient in interface GradientDescendablecomputeParameterGradient in interface ParameterGradientEvaluator<Vector,Vector,Matrix>input - Point about which to differentiate w.r.t. the parameters.public DifferentiableGeneralizedLinearModel clone()
AbstractCloneableSerializableObject 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 GradientDescendableclone in interface Vectorizableclone in interface VectorizableVectorFunctionclone in interface CloneableSerializableclone in class GeneralizedLinearModelpublic Matrix differentiate(Vector input)
DifferentiableVectorFunctioninput and return
the Jacobiandifferentiate in interface DifferentiableEvaluator<Vector,Vector,Matrix>differentiate in interface DifferentiableVectorFunctioninput - Vector input to the VectorFunction, about which to evaluate
the VectorFunctioninput