|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmarf.Stats.ProbabilityTable
public class ProbabilityTable
Probabilities Table for N-grams. The class is properly synchronized as of 0.3.0.5.
$Id: ProbabilityTable.java,v 1.41 2007/12/18 21:57:14 mokhov Exp $
| Constructor Summary | |
|---|---|
ProbabilityTable(java.lang.String pstrLanguage)
Constructor with the language parameter other than default. |
|
| Method Summary | |
|---|---|
void |
dumpCSV()
Allows dumping the contents of the table in the CSV format. |
java.lang.String |
getLang()
Retrieves current language. |
static java.lang.String |
getMARFSourceCodeRevision()
Returns source code revision information. |
double |
getOccurrence(int piX)
Allows getting an occurrence given the x coordinate. |
double |
getOccurrence(int piX,
int piY)
Allows getting an occurrence given x and y coordinates. |
double |
getOccurrence(int piX,
int piY,
int piZ)
Allows getting an occurrence given x, y, and z coordinates. |
double |
getOccurrence(java.util.Vector poObservationList)
Allows getting the occurrence of a list of observations. |
int |
incFrequency(java.util.Vector poObservationList)
Increments the frequency of occurrences of a list of observations. |
boolean |
normalize()
Not implemented. |
double |
p(Observation poObservationCause,
Observation poObservationEffect)
Not implemented. |
double |
p(Observation poObservationCause,
java.util.Vector poObservationList)
Not implemented. |
double |
p(java.util.Vector poObservationList)
Retrieves the probability of a list of observations as a number of occurrences. |
void |
setLang(java.lang.String pstrLang)
Allows setting a natural language associated with this table. |
void |
setOccurrence(int piX,
double pdOccurence)
Allows setting an occurrence given the x coordinate. |
void |
setOccurrence(int piX,
int piY,
double pdOccurrence)
Allows setting an occurrence given the x and y coordinates. |
void |
setOccurrence(int piX,
int piY,
int piZ,
double pdOccurrence)
Allows setting an occurrence given the x, y, and z coordinates. |
void |
setOccurrence(java.util.Vector poObservationList,
double pdOccurrence)
Allows setting an occurrence of a list of observations. |
int |
size()
Retrieves the size of the table. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProbabilityTable(java.lang.String pstrLanguage)
pstrLanguage - the language this table is forstrLang| Method Detail |
|---|
public final double p(Observation poObservationCause,
Observation poObservationEffect)
poObservationCause - unusedpoObservationEffect - unused
public final double p(Observation poObservationCause,
java.util.Vector poObservationList)
poObservationCause - unusedpoObservationList - unused
public final double p(java.util.Vector poObservationList)
poObservationList - a collection of observations
public final int size()
public final void setOccurrence(int piX,
double pdOccurence)
piX - the x indexpdOccurence - the occurrence
java.lang.ArrayIndexOutOfBoundsException - if the coordinate is out of range
public final void setOccurrence(int piX,
int piY,
double pdOccurrence)
piX - the x indexpiY - the y indexpdOccurrence - the occurrence
java.lang.ArrayIndexOutOfBoundsException - if either of the coordinates is out of range
public final void setOccurrence(int piX,
int piY,
int piZ,
double pdOccurrence)
piX - the x indexpiY - the y indexpiZ - the z indexpdOccurrence - the occurrence
java.lang.ArrayIndexOutOfBoundsException - if either of the coordinates is out of rangepublic final double getOccurrence(int piX)
piX - the x index
java.lang.ArrayIndexOutOfBoundsException - if the coordinate is out of range
public final double getOccurrence(int piX,
int piY)
piX - the x indexpiY - the y index
java.lang.ArrayIndexOutOfBoundsException - if either of the coordinates is out of range
public final double getOccurrence(int piX,
int piY,
int piZ)
piX - the x indexpiY - the y indexpiZ - the z index
java.lang.ArrayIndexOutOfBoundsException - if either of the coordinates is out of range
public final void setOccurrence(java.util.Vector poObservationList,
double pdOccurrence)
poObservationList - the listpdOccurrence - the desired occurrencepublic final double getOccurrence(java.util.Vector poObservationList)
poObservationList - the list
public final int incFrequency(java.util.Vector poObservationList)
poObservationList - the list to work with
public final boolean normalize()
public void dumpCSV()
public final void setLang(java.lang.String pstrLang)
pstrLang - the languagepublic final java.lang.String getLang()
public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||