public class SentimentCostAndGradient extends AbstractCachingDiffFunction
derivative, value
Constructor and Description |
---|
SentimentCostAndGradient(SentimentModel model,
java.util.List<Tree> trainingBatch) |
Modifier and Type | Method and Description |
---|---|
void |
calculate(double[] theta)
Calculate the value at x and the derivative
and save them in the respective fields.
|
int |
domainDimension()
Returns the number of dimensions in the function's domain
|
void |
forwardPropagateTree(Tree tree)
This is the method to call for assigning labels and node vectors
to the Tree.
|
clearCache, copy, derivativeAt, ensure, getDerivative, gradientCheck, gradientCheck, initial, lastValue, randomInitial, valueAt
public SentimentCostAndGradient(SentimentModel model, java.util.List<Tree> trainingBatch)
public int domainDimension()
Function
public void calculate(double[] theta)
AbstractCachingDiffFunction
calculate
in class AbstractCachingDiffFunction
theta
- The point at which to calculate the functionpublic void forwardPropagateTree(Tree tree)