cc.mallet.fst.semi_supervised.pr
Class ConstraintsOptimizableByPR
- java.lang.Object
-
- cc.mallet.fst.semi_supervised.pr.ConstraintsOptimizableByPR
-
- All Implemented Interfaces:
- Optimizable, Optimizable.ByGradientValue, java.io.Serializable
public class ConstraintsOptimizableByPR extends java.lang.Object implements java.io.Serializable, Optimizable.ByGradientValue
Optimizable for E-step/I-projection in Posterior Regularization (PR).- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface cc.mallet.optimize.Optimizable
Optimizable.ByBatchGradient, Optimizable.ByCombiningBatchGradient, Optimizable.ByGISUpdate, Optimizable.ByGradient, Optimizable.ByGradientValue, Optimizable.ByHessian, Optimizable.ByValue, Optimizable.ByVotedPerceptron
-
-
Constructor Summary
Constructors Constructor and Description ConstraintsOptimizableByPR(CRF crf, InstanceList ilist, PRAuxiliaryModel model)ConstraintsOptimizableByPR(CRF crf, InstanceList ilist, PRAuxiliaryModel model, int numThreads)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidcacheDotProducts()PRAuxiliaryModelgetAuxModel()double[][][][]getCachedDots()doublegetCompleteValueContribution()intgetNumParameters()doublegetParameter(int index)voidgetParameters(double[] params)doublegetValue()Returns the log probability of the training sequence labels and the prior over parameters.voidgetValueGradient(double[] buffer)voidsetParameter(int index, double value)voidsetParameters(double[] params)voidshutdown()
-
-
-
Constructor Detail
-
ConstraintsOptimizableByPR
public ConstraintsOptimizableByPR(CRF crf, InstanceList ilist, PRAuxiliaryModel model)
-
ConstraintsOptimizableByPR
public ConstraintsOptimizableByPR(CRF crf, InstanceList ilist, PRAuxiliaryModel model, int numThreads)
-
-
Method Detail
-
cacheDotProducts
public void cacheDotProducts()
-
getNumParameters
public int getNumParameters()
- Specified by:
getNumParametersin interfaceOptimizable
-
getParameters
public void getParameters(double[] params)
- Specified by:
getParametersin interfaceOptimizable
-
getParameter
public double getParameter(int index)
- Specified by:
getParameterin interfaceOptimizable
-
setParameters
public void setParameters(double[] params)
- Specified by:
setParametersin interfaceOptimizable
-
setParameter
public void setParameter(int index, double value)- Specified by:
setParameterin interfaceOptimizable
-
getValue
public double getValue()
Returns the log probability of the training sequence labels and the prior over parameters.- Specified by:
getValuein interfaceOptimizable.ByGradientValue
-
getCompleteValueContribution
public double getCompleteValueContribution()
-
getValueGradient
public void getValueGradient(double[] buffer)
- Specified by:
getValueGradientin interfaceOptimizable.ByGradientValue
-
shutdown
public void shutdown()
-
getCachedDots
public double[][][][] getCachedDots()
-
getAuxModel
public PRAuxiliaryModel getAuxModel()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG