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

## de.jstacs.classifiers.differentiableSequenceScoreBased.gendismix
Enum LearningPrinciple

    java.lang.Object
      java.lang.Enum<LearningPrinciple>
          de.jstacs.classifiers.differentiableSequenceScoreBased.gendismix.LearningPrinciple

All Implemented Interfaces:
  Serializable, Comparable<LearningPrinciple>

    public enum LearningPrinciple

extends Enum<LearningPrinciple>

This enum can be used to obtain the weights for well-known optimization tasks.

Author:
  Jens Keilwagen
See Also:
  `LogGenDisMixFunction`

Enum Constant Summary
`MAP` Maximum a posteriori.
`MCL` Maximum conditional likelihood.
`ML` Maximum Likelihood.
`MSP` Maximum supervised posterior.

Field Summary
`static int` | `CONDITIONAL_LIKELIHOOD_INDEX` This constant is the array index of the weighting factor for the conditional likelihood.
`static int` | `LIKELIHOOD_INDEX` This constant is the array index of the weighting factor for the likelihood.
`static int` | `PRIOR_INDEX` This constant is the array index of the weighting factor for the prior.

Method Summary
`static double[]` | `checkWeights(double[] weights)` This method checks the values of the `weights` array.
`static double[]` | `getBeta(LearningPrinciple key)` This method returns the standard weights for a predefined key.
`static LearningPrinciple` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static LearningPrinciple[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### ML

    public static final LearningPrinciple ML

  Maximum Likelihood.

### MAP

    public static final LearningPrinciple MAP

  Maximum a posteriori.

### MCL

    public static final LearningPrinciple MCL

  Maximum conditional likelihood.

### MSP

    public static final LearningPrinciple MSP

  Maximum supervised posterior.

Field Detail

### CONDITIONAL_LIKELIHOOD_INDEX

    public static final int CONDITIONAL_LIKELIHOOD_INDEX

  This constant is the array index of the weighting factor for the conditional likelihood.

  See Also:
    `getBeta(LearningPrinciple)`, Constant Field Values

### LIKELIHOOD_INDEX

    public static final int LIKELIHOOD_INDEX

  This constant is the array index of the weighting factor for the likelihood.

  See Also:
    `getBeta(LearningPrinciple)`, Constant Field Values

### PRIOR_INDEX

    public static final int PRIOR_INDEX

  This constant is the array index of the weighting factor for the prior.

  See Also:
    `getBeta(LearningPrinciple)`, Constant Field Values

Method Detail

### values

    public static LearningPrinciple[] values()

  Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

      for (LearningPrinciple c : LearningPrinciple.values())
          System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they are declared

### valueOf

    public static LearningPrinciple valueOf(String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `IllegalArgumentException` - if this enum type has no constant with the specified name
    `NullPointerException` - if the argument is null

### getBeta

    public static double[] getBeta(LearningPrinciple key)

  This method returns the standard weights for a predefined key.

  Parameters:
    `key` - the key
  Returns:
    the weights array
  See Also:
    `ML`, `MAP`, `MCL`, `MSP`

### checkWeights

    public static double[] checkWeights(double[] weights)
                                 throws IllegalArgumentException

  This method checks the values of the `weights` array. If everything is okay it returns a deep copy of the array, otherwise it throws an exception

  Parameters:
    `weights` - and array of length 3 with non-negative entries that sum to 1
  Returns:
    a deep copy of the array
  Throws:
    `IllegalArgumentException` - if the weights array is not correct

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