epfl.pdf
Class EMOnNormalKernel

java.lang.Object
  |
  +--epfl.pdf.EMOnNormalKernel

public class EMOnNormalKernel
extends java.lang.Object

EM algorithm on normal kernel pdf


Field Summary
 boolean findMissingValSubst
          Flag permitting the change of the missing value substitute
 double minGrowth
          Convergence criteria : min growth
 
Constructor Summary
EMOnNormalKernel(NormalKernelPdf workingPdf, double minGrowth, double minSigma, boolean findMissingValSubst, VectorReader data)
          Creates a new EM algorithm on the underlying NormalKernel pdf
EMOnNormalKernel(NormalKernelPdf workingPdf, double minGrowth, double minSigma, boolean findMissingValSubst, VectorReader data, VectorWriter likehoodOut)
          Creates a new EM algorithm on the underlying NormalKernel pdf
 
Method Summary
 void close()
          Closes the likehood output stream
 double currentGrowth()
          Returns the current growth (L(t+1) - L(t)) / L(t) where L = likehood
 double currentLikehood()
          Returns the currentLikehood
 long currentStep()
          Returns the current number of steps
 void flush()
          Flushes the likehood output stream
 NormalKernelPdf getNormalKernelPdf()
          Returns a reference on the NormalKernelPdf under maximization
 void init()
          Initializes the algorithm
 double maximizeLikehood(long maxIterations)
          Searches for the maximum likehood in maxIterations
 double nextStep()
          Executes one step from the EM algorithm
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

minGrowth

public double minGrowth
Convergence criteria : min growth

findMissingValSubst

public boolean findMissingValSubst
Flag permitting the change of the missing value substitute
Constructor Detail

EMOnNormalKernel

public EMOnNormalKernel(NormalKernelPdf workingPdf,
                        double minGrowth,
                        double minSigma,
                        boolean findMissingValSubst,
                        VectorReader data,
                        VectorWriter likehoodOut)
Creates a new EM algorithm on the underlying NormalKernel pdf
Parameters:
workingPdf - the underlying NormalKernel pdf
minGrowth - convergence criteria
minSigma - min value for sigma
findMissingValSubst - flag permitting the change of the missing value substitute in workingPdf
data - the data for building a pdf
likehoodOut - the output stream for likehood maximization

EMOnNormalKernel

public EMOnNormalKernel(NormalKernelPdf workingPdf,
                        double minGrowth,
                        double minSigma,
                        boolean findMissingValSubst,
                        VectorReader data)
Creates a new EM algorithm on the underlying NormalKernel pdf
Parameters:
workingPdf - the underlying NormalKernel pdf
minGrowth - convergence criteria
minSigma - min value for sigma
findMissingValSubst - flag permitting the change of the missing value substitute in workingPdf
data - the data for building a pdf
Method Detail

init

public void init()
Initializes the algorithm

maximizeLikehood

public double maximizeLikehood(long maxIterations)
                        throws java.io.IOException
Searches for the maximum likehood in maxIterations

nextStep

public double nextStep()
                throws java.io.IOException
Executes one step from the EM algorithm

currentStep

public long currentStep()
Returns the current number of steps

currentLikehood

public double currentLikehood()
Returns the currentLikehood

currentGrowth

public double currentGrowth()
Returns the current growth (L(t+1) - L(t)) / L(t) where L = likehood

getNormalKernelPdf

public NormalKernelPdf getNormalKernelPdf()
Returns a reference on the NormalKernelPdf under maximization

flush

public void flush()
           throws java.io.IOException
Flushes the likehood output stream

close

public void close()
           throws java.io.IOException
Closes the likehood output stream