il2.inf.edgedeletion
Class EDAlgorithm

Object
  extended by EDAlgorithm
Direct Known Subclasses:
EDMPAlgorithm, EDRecovery

public class EDAlgorithm
extends Object


Nested Class Summary
static class EDAlgorithm.RankingHeuristic
           
 
Field Summary
static Algorithm ALGORITHM_DEFAULT
          2008-10-30 4:33 PM PDT -- first time successfully running EDBP with RC sub-algorithm
 boolean doConvergenceUpdates
           
static double DOUBLE_THRESHOLD_DEFAULT
           
 double[] ecTimes
           
 double[] edgeConvergenceScores
           
static int INT_MAX_ITERATIONS_DEFAULT
           
static long LONG_TIMEOUT_MILLIS_DEFAULT
           
 
Constructor Summary
EDAlgorithm(BayesianNetwork bn)
          EDAlgorithm instance with all edges deleted.
EDAlgorithm(BayesianNetwork bn, int[][] edgesDeleted)
           
EDAlgorithm(BayesianNetwork bn, int[][] ed, int mi, long tm, double ct, Algorithm alg, Map<Algorithm.Setting,?> settings)
           
 
Method Summary
 Table cloneConditional(int oldEdge)
           
 boolean converged()
           
 String convergenceSummary()
          Returns summary of convergence and statistics.
 EDAlgorithm die()
           
 double[] edgeCorrelations()
           
 double[] edgeMis()
           
 int[][] edgesDeleted()
           
 double[] edgeTargetedMis(int query_var)
           
 EDNetwork edNet()
           
 Table getCloneCPT(int oldEdge)
          Given edge index i, returns CPT of clone variable.
 JoinTreeStats.Stat getClusterStats()
           
 double getCompilationTime()
           
 double getConvThreshold()
           
 double getCorrelationTime()
           
 double getEdgeRankingTime()
           
 double getGeneralEdgeCorrection()
           
 double[] getGeneralEdgeCorrections()
           
 double getLogZeroMiCorrection()
           
 int getMaxIterations()
           
 double getPropagationTime()
           
 JoinTreeStats.Stat getSeparatorStats()
           
 Table getSoftEvidenceCPT(int oldEdge)
          Given edge index i, returns CPT of soft evidence variable.
 long getTimeoutMillis()
           
 double getZeroMiCorrection()
          Edge Corrections
 double[] getZeroMiCorrections()
           
 int iterations()
           
 boolean iterationStatusOk()
           
 double kl(double[] v1, double[] v2)
           
 boolean limitsExceeded()
           
 double logPrEvidence()
           
 double oneMoreIteration(boolean restart)
           
 double prEvidence()
           
 int[][] rankEdgesByConvergence()
           
 int[][] rankEdgesByCorrelation()
           
 int[][] rankEdgesByMi()
           
 int[][] rankEdgesByScore(double[] scores)
           
 int[][] rankEdgesByTargetMi(int qvar)
           
 int[][] rankEdgesRandomly(Random r)
           
 void setConvThreshold(double ct)
           
 void setEvidence(IntMap e)
           
 void setMaxIterations(int mi)
           
 void setTable(int i, Table table)
           
 void setTimeoutMillis(long tm)
           
 double skl(double[] v1, double[] v2)
           
 long timeMillis()
           
 Table varConditional(int var)
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALGORITHM_DEFAULT

public static final Algorithm ALGORITHM_DEFAULT
2008-10-30 4:33 PM PDT -- first time successfully running EDBP with RC sub-algorithm

Since:
20081030

INT_MAX_ITERATIONS_DEFAULT

public static final int INT_MAX_ITERATIONS_DEFAULT
See Also:
Constant Field Values

LONG_TIMEOUT_MILLIS_DEFAULT

public static final long LONG_TIMEOUT_MILLIS_DEFAULT
See Also:
Constant Field Values

DOUBLE_THRESHOLD_DEFAULT

public static final double DOUBLE_THRESHOLD_DEFAULT
See Also:
Constant Field Values

ecTimes

public double[] ecTimes

doConvergenceUpdates

public boolean doConvergenceUpdates

edgeConvergenceScores

public double[] edgeConvergenceScores
Constructor Detail

EDAlgorithm

public EDAlgorithm(BayesianNetwork bn,
                   int[][] ed,
                   int mi,
                   long tm,
                   double ct,
                   Algorithm alg,
                   Map<Algorithm.Setting,?> settings)

EDAlgorithm

public EDAlgorithm(BayesianNetwork bn)
EDAlgorithm instance with all edges deleted. Corresponds to Loopy-BP. This is not recommended unless you specifically want all edges deleted (the tree case, also corresponds to Loopy-BP and is preferrable).


EDAlgorithm

public EDAlgorithm(BayesianNetwork bn,
                   int[][] edgesDeleted)
Method Detail

die

public EDAlgorithm die()
Since:
20080309

edNet

public EDNetwork edNet()
Since:
20080223

getMaxIterations

public int getMaxIterations()
Since:
20080227

getTimeoutMillis

public long getTimeoutMillis()
Since:
20080227

getConvThreshold

public double getConvThreshold()
Since:
20080227

iterations

public int iterations()

timeMillis

public long timeMillis()

converged

public boolean converged()

setMaxIterations

public void setMaxIterations(int mi)

setTimeoutMillis

public void setTimeoutMillis(long tm)

setConvThreshold

public void setConvThreshold(double ct)

edgesDeleted

public int[][] edgesDeleted()

getCloneCPT

public Table getCloneCPT(int oldEdge)
Given edge index i, returns CPT of clone variable.


getSoftEvidenceCPT

public Table getSoftEvidenceCPT(int oldEdge)
Given edge index i, returns CPT of soft evidence variable.


limitsExceeded

public boolean limitsExceeded()
Since:
20080311

iterationStatusOk

public boolean iterationStatusOk()

oneMoreIteration

public double oneMoreIteration(boolean restart)

getZeroMiCorrection

public double getZeroMiCorrection()
Edge Corrections


getLogZeroMiCorrection

public double getLogZeroMiCorrection()

getGeneralEdgeCorrection

public double getGeneralEdgeCorrection()

getZeroMiCorrections

public double[] getZeroMiCorrections()

getGeneralEdgeCorrections

public double[] getGeneralEdgeCorrections()

edgeCorrelations

public double[] edgeCorrelations()

rankEdgesByScore

public int[][] rankEdgesByScore(double[] scores)

rankEdgesRandomly

public int[][] rankEdgesRandomly(Random r)

rankEdgesByMi

public int[][] rankEdgesByMi()

rankEdgesByTargetMi

public int[][] rankEdgesByTargetMi(int qvar)

rankEdgesByCorrelation

public int[][] rankEdgesByCorrelation()

rankEdgesByConvergence

public int[][] rankEdgesByConvergence()

edgeMis

public double[] edgeMis()

edgeTargetedMis

public double[] edgeTargetedMis(int query_var)

kl

public double kl(double[] v1,
                 double[] v2)

skl

public double skl(double[] v1,
                  double[] v2)

setEvidence

public void setEvidence(IntMap e)

setTable

public void setTable(int i,
                     Table table)

prEvidence

public double prEvidence()

logPrEvidence

public double logPrEvidence()

varConditional

public Table varConditional(int var)

cloneConditional

public Table cloneConditional(int oldEdge)

getCompilationTime

public double getCompilationTime()

getPropagationTime

public double getPropagationTime()

getEdgeRankingTime

public double getEdgeRankingTime()

getCorrelationTime

public double getCorrelationTime()

getClusterStats

public JoinTreeStats.Stat getClusterStats()

getSeparatorStats

public JoinTreeStats.Stat getSeparatorStats()

convergenceSummary

public String convergenceSummary()
Returns summary of convergence and statistics. For SamIam GUI.



Copyright 2010 UCLA Automated Reasoning Group