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 TypMethodeBeschreibungvoidaddIn(double probability) Compounds the existingprobabilitymass on the label with the new probability passed in to the method.get()getLabel()getLog()booleanisLarger(Probability<T> probability) Checks if a probability is greater than the old one.voidset(double probability) Assigns aprobabilityto a label, discarding any previously assigned probability.voidset(Probability<T> probability) Assigns aprobabilityto a label, discarding any previously assigned probability.voidsetIfLarger(double probability) Assigns aprobabilityto a label, discarding any previously assigned probability, if the new probability is greater than the old one.voidsetIfLarger(Probability<T> probability) Assigns aprobabilityto a label, discarding any previously assigned probability, if the new probability is greater than the old one.voidsetLog(double probability) Assigns a logprobabilityto a label, discarding any previously assigned probability.toString()
-
Konstruktordetails
-
LogProbability
-
-
Methodendetails
-
set
public void set(double probability) Assigns aprobabilityto a label, discarding any previously assigned probability.- Setzt außer Kraft:
setin KlasseProbability<T>- Parameter:
probability- The probability to assign.
-
set
Assigns aprobabilityto a label, discarding any previously assigned probability.- Setzt außer Kraft:
setin KlasseProbability<T>- Parameter:
probability- TheProbabilityto assign.
-
setIfLarger
public void setIfLarger(double probability) Assigns aprobabilityto a label, discarding any previously assigned probability, if the new probability is greater than the old one.- Setzt außer Kraft:
setIfLargerin KlasseProbability<T>- Parameter:
probability- The probability to assign.
-
setIfLarger
Assigns aprobabilityto a label, discarding any previously assigned probability, if the new probability is greater than the old one.- Setzt außer Kraft:
setIfLargerin KlasseProbability<T>- Parameter:
probability- TheProbabilityto assign.
-
isLarger
Beschreibung aus Klasse kopiert:ProbabilityChecks if a probability is greater than the old one.- Setzt außer Kraft:
isLargerin KlasseProbability<T>- Parameter:
probability- the probability to check- Gibt zurück:
trueif a probability is greater than the old one,falseotherwise.
-
setLog
public void setLog(double probability) Assigns a logprobabilityto a label, discarding any previously assigned probability.- Setzt außer Kraft:
setLogin KlasseProbability<T>- Parameter:
probability- The log probability to assign.
-
addIn
public void addIn(double probability) Compounds the existingprobabilitymass on the label with the new probability passed in to the method.- Setzt außer Kraft:
addInin KlasseProbability<T>- Parameter:
probability- The probability weight to add.
-
get
- Setzt außer Kraft:
getin KlasseProbability<T>- Gibt zurück:
- Retrieves the probability associated with a label.
-
getLog
- Setzt außer Kraft:
getLogin KlasseProbability<T>- Gibt zurück:
- Retrieves the log probability associated with a label.
-
getLabel
- Setzt außer Kraft:
getLabelin KlasseProbability<T>- Gibt zurück:
- Retrieves the probabilities associated with all labels,
-
toString
- Setzt außer Kraft:
toStringin KlasseProbability<T>
-