marf.Stats.StatisticalEstimators.Smoothing
Class AddDelta
java.lang.Object
marf.Storage.StorageManager
marf.Stats.StatisticalEstimators.StatisticalEstimator
marf.Stats.StatisticalEstimators.Smoothing.Smoothing
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). |
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 |
dDelta
protected double dDelta
- Default is 0.5: Expected Likelihood Estimation (ELE).
AddDelta
public AddDelta(double pdDelta)
- Constructs the estimator with the specified delta.
- Parameters:
pdDelta
- the delta
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