marf.Stats
Class Observation

java.lang.Object
  extended by marf.Stats.StatisticalObject
      extended by marf.Stats.WordStats
          extended by marf.Stats.Observation
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
Ngram

public class Observation
extends WordStats

Generic Observation of an occurrence of something (like a word or an n-gram).

$Id: Observation.java,v 1.13 2007/12/18 21:57:14 mokhov Exp $

Since:
0.3.0.2
Version:
$Revision: 1.13 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
protected  boolean bSeen
          Indicates a fact that this observation has been "seen".
protected  double dPosteriorProbability
          Probability of the observation after it was observed.
protected  double dPriorProbability
          Probability of the observation of happening prior it actually being observed.
 
Fields inherited from class marf.Stats.StatisticalObject
iFrequency, iRank
 
Constructor Summary
Observation()
          Constructs default unseen observation with zero probabilities.
Observation(Observation poObservation)
          Copy-constructor.
 
Method Summary
 java.lang.Object clone()
          Implements Cloneable interface for the Observation object.
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 double getPosteriorProbability()
          Allows querying for the current value of the posterior probability.
 double getPriorProbability()
          Allows querying for the current value of the prior probability.
 void markAsSeen()
          Marks this observation as seen.
 void setPosteriorProbability(double pdPosteriorProbability)
          Allows setting the new value of the posterior probability.
 void setPriorProbability(double pdPriorProbability)
          Allows setting the new value of the prior probability.
 boolean wasSeen()
          Indicates whether this observation was actually seen.
 
Methods inherited from class marf.Stats.WordStats
getLexeme, toString
 
Methods inherited from class marf.Stats.StatisticalObject
equals, getFrequency, getRank, hashCode, incFrequency, incRank, setRank
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dPriorProbability

protected double dPriorProbability
Probability of the observation of happening prior it actually being observed.


dPosteriorProbability

protected double dPosteriorProbability
Probability of the observation after it was observed.


bSeen

protected boolean bSeen
Indicates a fact that this observation has been "seen".

Constructor Detail

Observation

public Observation()
Constructs default unseen observation with zero probabilities.

Since:
0.3.0.5

Observation

public Observation(Observation poObservation)
Copy-constructor.

Parameters:
poObservation - the Observation object to copy properties of
Since:
0.3.0.5
Method Detail

wasSeen

public boolean wasSeen()
Indicates whether this observation was actually seen.

Returns:
true if it was seen
Since:
0.3.0.5

markAsSeen

public void markAsSeen()
Marks this observation as seen.

Since:
0.3.0.5

getPosteriorProbability

public double getPosteriorProbability()
Allows querying for the current value of the posterior probability.

Returns:
the current posterior probability of this observation
Since:
0.3.0.5

setPosteriorProbability

public void setPosteriorProbability(double pdPosteriorProbability)
Allows setting the new value of the posterior probability.

Parameters:
pdPosteriorProbability - the posterior probability to set
Since:
0.3.0.5

getPriorProbability

public double getPriorProbability()
Allows querying for the current value of the prior probability.

Returns:
the current prior probability of this observation
Since:
0.3.0.5

setPriorProbability

public void setPriorProbability(double pdPriorProbability)
Allows setting the new value of the prior probability.

Parameters:
pdPriorProbability - the prior probability to set
Since:
0.3.0.5

clone

public java.lang.Object clone()
Implements Cloneable interface for the Observation object.

Overrides:
clone in class WordStats
Since:
0.3.0.5
See Also:
Object.clone()

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Returns source code revision information.

Returns:
revision string


SourceForge Logo