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

## de.jstacs.classifiers.differentiableSequenceScoreBased.logPrior
Class DoesNothingLogPrior

    java.lang.Object
      de.jstacs.algorithms.optimization.DifferentiableFunction
          de.jstacs.classifiers.differentiableSequenceScoreBased.logPrior.LogPrior
              de.jstacs.classifiers.differentiableSequenceScoreBased.logPrior.DoesNothingLogPrior

All Implemented Interfaces:
  Function, Storable

    public class DoesNothingLogPrior

extends LogPrior

This class defines a `LogPrior` that does not penalize any parameter.

Author:
  Jens Keilwagen

Field Summary
`static DoesNothingLogPrior` | `defaultInstance` As this prior does not penalize parameters and does not have any parameters itself, this class does not have a constructor, but provides a default instance in order to reduce memory consumption.

Fields inherited from class de.jstacs.classifiers.differentiableSequenceScoreBased.logPrior.LogPrior
`UNKNOWN`

Method Summary
`void` | `addGradientFor(double[] params, double[] grad)` Adds the gradient of the log-prior using the current parameters to a given vector.
`double` | `evaluateFunction(double[] params)` Evaluates the function at a certain vector (in mathematical sense) `x`.
`int` | `getDimensionOfScope()` Returns the dimension of the scope of the `Function`.
`String` | `getInstanceName()` Returns a short instance name.
`LogPrior` | `getNewInstance()` This method returns an empty new instance of the current prior.
`StringBuffer` | `toXML()` Deprecated.

Methods inherited from class de.jstacs.classifiers.differentiableSequenceScoreBased.logPrior.LogPrior
`evaluateGradientOfFunction, set`

Methods inherited from class de.jstacs.algorithms.optimization.DifferentiableFunction
`findOneDimensionalMin`

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

Field Detail

### defaultInstance

    public static final DoesNothingLogPrior defaultInstance

  As this prior does not penalize parameters and does not have any parameters itself, this class does not have a constructor, but provides a default instance in order to reduce memory consumption.

Method Detail

### evaluateFunction

    public double evaluateFunction(double[] params)

  Description copied from interface: `Function`
  Evaluates the function at a certain vector (in mathematical sense) `x`.

  Parameters:
    `params` - the current vector
  Returns:
    the evaluation of the function

### addGradientFor

    public void addGradientFor(double[] params,
                               double[] grad)

  Description copied from class: `LogPrior`
  Adds the gradient of the log-prior using the current parameters to a given vector.

  Specified by:
    `addGradientFor` in class `LogPrior`
  Parameters:
    `params` - the parameters
    `grad` - the vector

### getDimensionOfScope

    public int getDimensionOfScope()

  Description copied from interface: `Function`
  Returns the dimension of the scope of the `Function`.

  Returns:
    the dimension of the scope: `n` with

### getNewInstance

    public LogPrior getNewInstance()
                            throws CloneNotSupportedException

  Description copied from class: `LogPrior`
  This method returns an empty new instance of the current prior. The method works similar to clone, but does not clone `DifferentiableSequenceScore` s that may be inside the instance. The `DifferentiableSequenceScore`s must be set by an invocation of the method `LogPrior.set(boolean, DifferentiableSequenceScore...)`.

  Specified by:
    `getNewInstance` in class `LogPrior`
  Returns:
    a new empty instance of the prior
  Throws:
    `CloneNotSupportedException` - if something went wrong while cloning
  See Also:
    `LogPrior.set(boolean, DifferentiableSequenceScore...)`

### toXML

    @Deprecated
    public StringBuffer toXML()
                       throws RuntimeException

  Deprecated.

  Description copied from class: `LogPrior`
  Encodes the prior as an XML representation. It does not encode all information, since the method `LogPrior.set(boolean, DifferentiableSequenceScore...)` has to be invoked after decoding.

  Specified by:
    `toXML` in interface `Storable`
  Specified by:
    `toXML` in class `LogPrior`
  Returns:
    the XML representation;
  Throws:
    `RuntimeException`

### getInstanceName

    public String getInstanceName()

  Description copied from class: `LogPrior`
  Returns a short instance name.

  Specified by:
    `getInstanceName` in class `LogPrior`
  Returns:
    a short instance name

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