|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.filters.Filter
weka.filters.SimpleFilter
weka.filters.SimpleBatchFilter
weka.filters.unsupervised.attribute.EMImputation
public class EMImputation
Replaces missing numeric values using Expectation Maximization with a multivariate normal model. Described in " Schafer, J.L. Analysis of Incomplete Multivariate Data, New York: Chapman and Hall, 1997."
Valid options are:-N Maximum number of iterations for Expectation Maximization. (-1 = no maximum)
-E Threshold for convergence in Expectation Maximization. If the change in the observed data log-likelihood (posterior density if a ridge prior is being used) across iterations is no more than this value, then convergence is considered to be achieved and the iterative process is ceased. (default = 0.0001)
-P Use a ridge prior instead of the noninformative prior. This helps when the data has a singular covariance matrix.
-Q The ridge parameter for when a ridge prior is used.
Constructor Summary | |
---|---|
EMImputation()
|
Method Summary | |
---|---|
Capabilities |
getCapabilities()
Returns the Capabilities of this filter. |
double |
getLogLikelihoodThreshold()
Gets the EM log-likelihood convergence threshold |
int |
getNumIterations()
Gets the maximum number of EM iterations |
java.lang.String[] |
getOptions()
Gets the current settings of EMImputation |
java.lang.String |
getRevision()
Returns the revision string. |
double |
getRidge()
Get ridge parameter. |
boolean |
getUseRidgePrior()
Get whether to use a ridge prior. |
java.lang.String |
globalInfo()
Returns a string describing this filter |
java.util.Enumeration |
listOptions()
Returns an enumeration describing the available options. |
java.lang.String |
logLikelihoodThresholdTipText()
Returns the tip text for this property |
static void |
main(java.lang.String[] argv)
Main method for testing this class. |
java.lang.String |
numIterationsTipText()
Returns the tip text for this property |
java.lang.String |
ridgeTipText()
Returns the tip text for this property. |
boolean |
setInputFormat(Instances instanceInfo)
Sets the format of the input instances. |
void |
setLogLikelihoodThreshold(double newThreshold)
Sets the EM log-likelihood convergence threshold |
void |
setNumIterations(int newIterations)
Sets the maximum number of EM iterations |
void |
setOptions(java.lang.String[] options)
Parses a given list of options. |
void |
setRidge(double ridge)
Set ridge parameter |
void |
setUseRidgePrior(boolean prior)
Set whether to use a ridge prior. |
java.lang.String |
useRidgePriorTipText()
Returns the tip text for this property. |
Methods inherited from class weka.filters.SimpleBatchFilter |
---|
batchFinished, input |
Methods inherited from class weka.filters.SimpleFilter |
---|
debugTipText, getDebug, setDebug |
Methods inherited from class weka.filters.Filter |
---|
batchFilterFile, filterFile, getCapabilities, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, makeCopies, makeCopy, numPendingOutput, output, outputPeek, toString, useFilter, wekaStaticWrapper |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EMImputation()
Method Detail |
---|
public java.lang.String globalInfo()
globalInfo
in class SimpleFilter
public Capabilities getCapabilities()
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class Filter
Capabilities
public java.util.Enumeration listOptions()
listOptions
in interface OptionHandler
listOptions
in class SimpleFilter
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-N Maximum number of iterations for Expectation Maximization. (-1 = no maximum)
-E Threshold for convergence in Expectation Maximization. If the change in the observed data log-likelihood (posterior density if a ridge prior is being used) across iterations is no more than this value, then convergence is considered to be achieved and the iterative process is ceased. (default = 0.0001)
-P Use a ridge prior instead of the noninformative prior. This helps when the data has a singular covariance matrix.
-Q The ridge parameter for when a ridge prior is used.
setOptions
in interface OptionHandler
setOptions
in class SimpleFilter
options
- the list of options as an array of strings
java.lang.Exception
- if an option is not supportedSimpleFilter.reset()
public java.lang.String[] getOptions()
getOptions
in interface OptionHandler
getOptions
in class SimpleFilter
public java.lang.String numIterationsTipText()
public void setNumIterations(int newIterations)
newIterations
- the maximum number of EM iterationspublic int getNumIterations()
public java.lang.String logLikelihoodThresholdTipText()
public void setLogLikelihoodThreshold(double newThreshold)
newThreshold
- the EM log-likelihood convergence thresholdpublic double getLogLikelihoodThreshold()
public java.lang.String useRidgePriorTipText()
public boolean getUseRidgePrior()
public void setUseRidgePrior(boolean prior)
prior
- whether to use a ridge prior.public java.lang.String ridgeTipText()
public double getRidge()
public void setRidge(double ridge)
ridge
- new ridge parameterpublic boolean setInputFormat(Instances instanceInfo) throws java.lang.Exception
setInputFormat
in class SimpleFilter
instanceInfo
- an Instances object containing the input
instance structure (any instances contained in the object are
ignored - only the structure is required).
java.lang.Exception
- if the input format can't be set
successfullySimpleFilter.reset()
public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class Filter
public static void main(java.lang.String[] argv)
argv
- should contain arguments to the filter:
use -h for help
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |