Klasse UniformPrior

java.lang.Object
opennlp.tools.ml.model.UniformPrior
Alle implementierten Schnittstellen:
Prior

public class UniformPrior extends Object implements Prior
Provide a maximum entropy model with a uniform Prior.
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    boolean
     
    int
     
    void
    logPrior(double[] dist, int[] context)
    Populates the specified array with the log of the distribution for the specified context.
    void
    logPrior(double[] dist, int[] context, float[] values)
    Populates the specified array with the log of the distribution for the specified context.
    void
    logPrior(double[] dist, Context[] context, float[] values)
    Populates the specified array with the log of the distribution for the specified context.
    void
    setLabels(String[] outcomeLabels, String[] contextLabels)
    Method to specify the label for the outcomes and contexts.

    Von Klasse geerbte Methoden java.lang.Object

    getClass, notify, notifyAll, toString, wait, wait, wait
  • Konstruktordetails

    • UniformPrior

      public UniformPrior()
  • Methodendetails

    • logPrior

      public void logPrior(double[] dist, int[] context, float[] values)
      Beschreibung aus Schnittstelle kopiert: Prior
      Populates the specified array with the log of the distribution for the specified context. The returned array will be overwritten and needs to be re-initialized with every call to this method.
      Angegeben von:
      logPrior in Schnittstelle Prior
      Parameter:
      dist - An array to be populated with the log of the prior distribution.
      context - The indices of the contextual predicates for an event.
      values - The values associated with the context.
    • logPrior

      public void logPrior(double[] dist, Context[] context, float[] values)
      Beschreibung aus Schnittstelle kopiert: Prior
      Populates the specified array with the log of the distribution for the specified context. The returned array will be overwritten and needs to be re-initialized with every call to this method.
      Angegeben von:
      logPrior in Schnittstelle Prior
      Parameter:
      dist - An array to be populated with the log of the prior distribution.
      context - The indices of the contextual predicates for an event.
      values - The values associated with the context.
    • logPrior

      public void logPrior(double[] dist, int[] context)
      Beschreibung aus Schnittstelle kopiert: Prior
      Populates the specified array with the log of the distribution for the specified context. The returned array will be overwritten and needs to be re-initialized with every call to this method.
      Angegeben von:
      logPrior in Schnittstelle Prior
      Parameter:
      dist - An array to be populated with the log of the prior distribution.
      context - The indices of the contextual predicates for an event.
    • setLabels

      public void setLabels(String[] outcomeLabels, String[] contextLabels)
      Beschreibung aus Schnittstelle kopiert: Prior
      Method to specify the label for the outcomes and contexts. This is used to map integer outcomes and contexts to their string values. This method is called prior to any call to Prior.logPrior(double[], int[]).
      Angegeben von:
      setLabels in Schnittstelle Prior
      Parameter:
      outcomeLabels - An array of each outcome label.
      contextLabels - An array of each context label.
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • equals

      public boolean equals(Object obj)
      Setzt außer Kraft:
      equals in Klasse Object