T - the label (category) classpublic class LogProbability<T> extends Probability<T>
| Constructor and Description | 
|---|
LogProbability(T label)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addIn(double probability)
Compounds the existing probability mass on the label with the new
 probability passed in to the method. 
 | 
Double | 
get()
Returns the probability associated with a label 
 | 
T | 
getLabel()
Returns the probabilities associated with all labels 
 | 
Double | 
getLog()
Returns the log probability associated with a label 
 | 
boolean | 
isLarger(Probability probability)
Checks if a probability is greater than the old one. 
 | 
void | 
set(double probability)
Assigns a probability to a label, discarding any previously assigned probability. 
 | 
void | 
set(Probability probability)
Assigns a probability to a label, discarding any previously assigned probability. 
 | 
void | 
setIfLarger(double probability)
Assigns a probability to a label, discarding any previously assigned probability,
 if the new probability is greater than the old one. 
 | 
void | 
setIfLarger(Probability probability)
Assigns a probability to a label, discarding any previously assigned probability,
 if the new probability is greater than the old one. 
 | 
void | 
setLog(double probability)
Assigns a log probability to a label, discarding any previously assigned probability. 
 | 
String | 
toString()  | 
public LogProbability(T label)
public void set(double probability)
set in class Probability<T>probability - the probability to assignpublic void set(Probability probability)
set in class Probability<T>probability - the probability to assignpublic void setIfLarger(double probability)
setIfLarger in class Probability<T>probability - the probability to assignpublic void setIfLarger(Probability probability)
setIfLarger in class Probability<T>probability - the probability to assignpublic boolean isLarger(Probability probability)
isLarger in class Probability<T>probability - the probability to assignpublic void setLog(double probability)
setLog in class Probability<T>probability - the log probability to assignpublic void addIn(double probability)
addIn in class Probability<T>probability - the probability weight to addpublic Double get()
get in class Probability<T>public Double getLog()
getLog in class Probability<T>public T getLabel()
getLabel in class Probability<T>public String toString()
toString in class Probability<T>Copyright © 2017 The Apache Software Foundation. All rights reserved.