Package opennlp.tools.ml.naivebayes
Klasse LogProbability<T>
java.lang.Object
opennlp.tools.ml.naivebayes.Probability<T>
opennlp.tools.ml.naivebayes.LogProbability<T>
- Typparameter:
T
- The label (category) class.
A class implementing the logarithmic
Probability
for a label.-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
addIn
(double probability) Compounds the existingprobability
mass on the label with the new probability passed in to the method.get()
getLabel()
getLog()
boolean
isLarger
(Probability<T> probability) Checks if a probability is greater than the old one.void
set
(double probability) Assigns aprobability
to a label, discarding any previously assigned probability.void
set
(Probability<T> probability) Assigns aprobability
to a label, discarding any previously assigned probability.void
setIfLarger
(double probability) Assigns aprobability
to a label, discarding any previously assigned probability, if the new probability is greater than the old one.void
setIfLarger
(Probability<T> probability) Assigns aprobability
to a label, discarding any previously assigned probability, if the new probability is greater than the old one.void
setLog
(double probability) Assigns a logprobability
to a label, discarding any previously assigned probability.toString()
-
Konstruktordetails
-
LogProbability
-
-
Methodendetails
-
set
public void set(double probability) Assigns aprobability
to a label, discarding any previously assigned probability.- Setzt außer Kraft:
set
in KlasseProbability<T>
- Parameter:
probability
- The probability to assign.
-
set
Assigns aprobability
to a label, discarding any previously assigned probability.- Setzt außer Kraft:
set
in KlasseProbability<T>
- Parameter:
probability
- TheProbability
to assign.
-
setIfLarger
public void setIfLarger(double probability) Assigns aprobability
to a label, discarding any previously assigned probability, if the new probability is greater than the old one.- Setzt außer Kraft:
setIfLarger
in KlasseProbability<T>
- Parameter:
probability
- The probability to assign.
-
setIfLarger
Assigns aprobability
to a label, discarding any previously assigned probability, if the new probability is greater than the old one.- Setzt außer Kraft:
setIfLarger
in KlasseProbability<T>
- Parameter:
probability
- TheProbability
to assign.
-
isLarger
Beschreibung aus Klasse kopiert:Probability
Checks if a probability is greater than the old one.- Setzt außer Kraft:
isLarger
in KlasseProbability<T>
- Parameter:
probability
- the probability to check- Gibt zurück:
true
if a probability is greater than the old one,false
otherwise.
-
setLog
public void setLog(double probability) Assigns a logprobability
to a label, discarding any previously assigned probability.- Setzt außer Kraft:
setLog
in KlasseProbability<T>
- Parameter:
probability
- The log probability to assign.
-
addIn
public void addIn(double probability) Compounds the existingprobability
mass on the label with the new probability passed in to the method.- Setzt außer Kraft:
addIn
in KlasseProbability<T>
- Parameter:
probability
- The probability weight to add.
-
get
- Setzt außer Kraft:
get
in KlasseProbability<T>
- Gibt zurück:
- Retrieves the probability associated with a label.
-
getLog
- Setzt außer Kraft:
getLog
in KlasseProbability<T>
- Gibt zurück:
- Retrieves the log probability associated with a label.
-
getLabel
- Setzt außer Kraft:
getLabel
in KlasseProbability<T>
- Gibt zurück:
- Retrieves the probabilities associated with all labels,
-
toString
- Setzt außer Kraft:
toString
in KlasseProbability<T>
-