marf.Stats.StatisticalEstimators.Smoothing
Class AddDelta

java.lang.Object
  extended by marf.Storage.StorageManager
      extended by marf.Stats.StatisticalEstimators.StatisticalEstimator
          extended by marf.Stats.StatisticalEstimators.Smoothing.Smoothing
              extended by marf.Stats.StatisticalEstimators.Smoothing.AddDelta
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, IStatisticalEstimator, ISmoothing, IStorageManager
Direct Known Subclasses:
AddOne, MLE

public class AddDelta
extends Smoothing

Add-Delta Smoothing Estimator. The delta in fact determines the type of an estimator, e.g. 0.5 is for ELE, 0.0 for MLE, 1.0 for Add-One are the special cases.

$Id: AddDelta.java,v 1.34 2007/12/18 21:57:15 mokhov Exp $

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

Field Summary
protected  double dDelta
          Default is 0.5: Expected Likelihood Estimation (ELE).
 
Fields inherited from class marf.Stats.StatisticalEstimators.StatisticalEstimator
oProbabilityTable, oStreamTokenizer
 
Fields inherited from class marf.Storage.StorageManager
bDumpOnNotFound, iCurrentDumpMode, oObjectToSerialize, strFilename
 
Fields inherited from interface marf.Stats.StatisticalEstimators.Smoothing.ISmoothing
MARF_INTERFACE_CODE_REVISION
 
Fields inherited from interface marf.Stats.StatisticalEstimators.IStatisticalEstimator
MARF_INTERFACE_CODE_REVISION
 
Fields inherited from interface marf.Storage.IStorageManager
DUMP_BINARY, DUMP_CSV_TEXT, DUMP_GZIP_BINARY, DUMP_HTML, DUMP_SQL, DUMP_XML, MARF_INTERFACE_CODE_REVISION, STORAGE_FILE_EXTENSIONS
 
Constructor Summary
AddDelta(double pdDelta)
          Constructs the estimator with the specified delta.
 
Method Summary
 double getDelta()
          Allows querying for the current value of delta.
static java.lang.String getMARFSourceCodeRevision()
          Returns source code revision information.
 boolean smooth()
          Implements add-delta smoothing for uni-, bi-, and tri-grams.
 
Methods inherited from class marf.Stats.StatisticalEstimators.Smoothing.Smoothing
train
 
Methods inherited from class marf.Stats.StatisticalEstimators.StatisticalEstimator
backSynchronizeObject, dumpCSV, dumpXML, getFilename, getLanguage, getProbabilityTable, getStreamTokenizer, p, resetFilename, restoreCSV, restoreXML, setLanguage, setStreamTokenizer
 
Methods inherited from class marf.Storage.StorageManager
clone, dump, dumpBinary, dumpGzipBinary, dumpHTML, dumpSQL, enableDumpOnNotFound, equals, getDefaultExtension, getDefaultExtension, getDumpMode, getObjectToSerialize, hashCode, restore, restoreBinary, restoreGzipBinary, restoreHTML, restoreSQL, setDumpMode, setFilename, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

dDelta

protected double dDelta
Default is 0.5: Expected Likelihood Estimation (ELE).

Constructor Detail

AddDelta

public AddDelta(double pdDelta)
Constructs the estimator with the specified delta.

Parameters:
pdDelta - the delta
Method Detail

getDelta

public final double getDelta()
Allows querying for the current value of delta.

Returns:
the current value of delta

smooth

public boolean smooth()
Implements add-delta smoothing for uni-, bi-, and tri-grams.

Returns:
true if any smoothing took place and underlying data was altered
See Also:
ISmoothing.smooth()

getMARFSourceCodeRevision

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

Returns:
revision string


SourceForge Logo