Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cc.mallet.classify
Class MaxEntOptimizableByGE

    java.lang.Object
      cc.mallet.classify.MaxEntOptimizableByGE

All Implemented Interfaces:
  Optimizable, Optimizable.ByGradientValue

    public class MaxEntOptimizableByGE

extends java.lang.Object
implements Optimizable.ByGradientValue

Author:
  gdruck

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
`MaxEntOptimizableByGE(InstanceList trainingList, java.util.HashMap<java.lang.Integer,double[]> constraints, MaxEnt initClassifier)`

Method Summary
`MaxEnt` | `getClassifier()`
`int` | `getNumParameters()`
`double` | `getParameter(int index)`
`void` | `getParameters(double[] buffer)`
`double` | `getValue()`
`void` | `getValueGradient(double[] buffer)`
`void` | `setGaussianPriorVariance(double variance)` Sets the variance for Gaussian prior or equivalently the inverse of the weight of the L2 regularization term.
`void` | `setParameter(int index, double value)`
`void` | `setParameters(double[] params)`
`void` | `setTemperature(double temp)` Set the temperature, 1 / the exponent model predicted probabilities are raised to when computing model expectations.
`void` | `setWeight(double weight)` The weight of GE term in the objective function.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MaxEntOptimizableByGE

    public MaxEntOptimizableByGE(InstanceList trainingList,
                                 java.util.HashMap<java.lang.Integer,double[]> constraints,
                                 MaxEnt initClassifier)

Parameters:
  `trainingList` - List with unlabeled training instances.
  `constraints` - Feature expectation constraints.
  `initClassifier` - Initial classifier.

Method Detail

### setGaussianPriorVariance

    public void setGaussianPriorVariance(double variance)

  Sets the variance for Gaussian prior or equivalently the inverse of the weight of the L2 regularization term.

  Parameters:
    `variance` - Gaussian prior variance.

### setTemperature

    public void setTemperature(double temp)

  Set the temperature, 1 / the exponent model predicted probabilities are raised to when computing model expectations. As the temperature increases, model probabilities approach 1 for the maximum probability class, and 0 for other classes. DEFAULT: 1

  Parameters:
    `temp` - Temperature.

### setWeight

    public void setWeight(double weight)

  The weight of GE term in the objective function.

  Parameters:
    `weight` - GE term weight.

### getClassifier

    public MaxEnt getClassifier()

### getValue

    public double getValue()

  Specified by:
    `getValue` in interface `Optimizable.ByGradientValue`

### getValueGradient

    public void getValueGradient(double[] buffer)

  Specified by:
    `getValueGradient` in interface `Optimizable.ByGradientValue`

### getNumParameters

    public int getNumParameters()

  Specified by:
    `getNumParameters` in interface `Optimizable`

### getParameter

    public double getParameter(int index)

  Specified by:
    `getParameter` in interface `Optimizable`

### getParameters

    public void getParameters(double[] buffer)

  Specified by:
    `getParameters` in interface `Optimizable`

### setParameter

    public void setParameter(int index,
                             double value)

  Specified by:
    `setParameter` in interface `Optimizable`

### setParameters

    public void setParameters(double[] params)

  Specified by:
    `setParameters` in interface `Optimizable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD