Package cc.mallet.topics
Class DMROptimizable
- java.lang.Object
-
- cc.mallet.topics.DMROptimizable
-
- All Implemented Interfaces:
Optimizable,Optimizable.ByGradientValue
public class DMROptimizable extends java.lang.Object implements Optimizable.ByGradientValue
-
-
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 Description DMROptimizable()DMROptimizable(InstanceList instances, MaxEnt initialClassifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MaxEntgetClassifier()intgetNumParameters()doublegetParameter(int index)voidgetParameters(double[] buff)doublegetValue()The log probability of the observed count vectors given the features.voidgetValueGradient(double[] buffer)voidsetInterceptGaussianPriorVariance(double sigmaSquared)Set the variance for the default features (aka intercept terms), generally larger than the variance for the regular features.voidsetParameter(int index, double v)voidsetParameters(double[] buff)voidsetRegularGaussianPriorVariance(double sigmaSquared)Set the variance for regular (non default) features, generally smaller than the variance for the default features.
-
-
-
Constructor Detail
-
DMROptimizable
public DMROptimizable()
-
DMROptimizable
public DMROptimizable(InstanceList instances, MaxEnt initialClassifier)
-
-
Method Detail
-
setInterceptGaussianPriorVariance
public void setInterceptGaussianPriorVariance(double sigmaSquared)
Set the variance for the default features (aka intercept terms), generally larger than the variance for the regular features.
-
setRegularGaussianPriorVariance
public void setRegularGaussianPriorVariance(double sigmaSquared)
Set the variance for regular (non default) features, generally smaller than the variance for the default features.
-
getClassifier
public MaxEnt getClassifier()
-
getParameter
public double getParameter(int index)
- Specified by:
getParameterin interfaceOptimizable
-
setParameter
public void setParameter(int index, double v)- Specified by:
setParameterin interfaceOptimizable
-
getNumParameters
public int getNumParameters()
- Specified by:
getNumParametersin interfaceOptimizable
-
getParameters
public void getParameters(double[] buff)
- Specified by:
getParametersin interfaceOptimizable
-
setParameters
public void setParameters(double[] buff)
- Specified by:
setParametersin interfaceOptimizable
-
getValue
public double getValue()
The log probability of the observed count vectors given the features.- Specified by:
getValuein interfaceOptimizable.ByGradientValue
-
getValueGradient
public void getValueGradient(double[] buffer)
- Specified by:
getValueGradientin interfaceOptimizable.ByGradientValue
-
-