|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.ksu.cis.bnj.bbn.inference.Inference
edu.ksu.cis.bnj.bbn.inference.ApproximateInference
edu.ksu.cis.bnj.bbn.inference.approximate.sampling.MCMC
Super class for MCMC based approximate inference engine
Field Summary | |
protected boolean |
abort
flag that signals the getMarginals function of subclasses to abort |
protected java.util.Timer |
abortTimer
Timer used to set the abort flag after a given amount of time |
static int |
defaultMaxIteration
|
protected boolean |
generateSamples
|
protected java.util.LinkedList |
listeners
|
protected int |
maxIteration
|
static long |
NO_TIME_LIMIT
|
protected static java.lang.String |
OPT_GENERATE_DATA
|
protected static java.lang.String |
OPT_MAX_ITERATION
|
protected static java.lang.String |
OPT_RUNNING_TIME_LIMIT
|
protected static java.lang.String |
OPT_USE_MARKOV_BLANKET
|
protected static MersenneTwisterFast |
random
|
protected long |
runningTimeLimit
Sets the limit (in milliseconds) for how long the procedure should run |
protected Table |
tuples
|
protected boolean |
useMarkovBlanketScore
|
Fields inherited from class edu.ksu.cis.bnj.bbn.inference.ApproximateInference |
rmseWriter |
Fields inherited from class edu.ksu.cis.bnj.bbn.inference.Inference |
graph, inferenceClassName, MAP, MARGINALS, marginalsResult, MPE, OPT_RUN_TYPE, options |
Fields inherited from interface edu.ksu.cis.kdd.util.gui.Optionable |
OPT_OUTPUT_FILE |
Constructor Summary | |
MCMC()
|
|
MCMC(BBNGraph g)
|
Method Summary | |
protected void |
abort()
Sets the abort flag to true, which tells the getMarginals functions to exit at the end of the current iteration. |
void |
addListener(MCMCListener l)
|
protected void |
cancelAbortTimer()
Cancel the abort timer. |
void |
generateData(boolean d)
|
Table |
generateData(int howmuch)
Generate data out of a BBN. |
Table |
getData()
|
java.util.Hashtable |
getDefaultOptions()
TODO: need to read from config file and/or through Settings.java |
java.util.Hashtable |
getMarkovBlanketScore(BBNNode n,
java.util.Hashtable chosen)
Get Markov blanket scoring. |
int |
getMaxIteration()
|
OptionGUI |
getOptionsDialog()
|
long |
getRunningTimeLimit()
Gets the Running time limit, which methods can use to abort an inference after a specific amount of time. |
boolean |
isUseMarkovBlanketScore()
|
void |
removeListener(MCMCListener l)
|
protected void |
sendEvent(MCMCEvent e)
|
protected void |
setAbortTimer()
Set a timer to expire in the number of milliseconds specified by runningTimeLimit. |
void |
setMaxIteration(int maxIteration)
Sets the maxIteration. |
void |
setRunningTimeLimit(long mseconds)
Sets the Running time limit, which methods can use to abort an inference after a specific amount of time. |
void |
setUseMarkovBlanketScore(boolean useMarkovBlanketScore)
Sets the useMarkovBlanketScore. |
Methods inherited from class edu.ksu.cis.bnj.bbn.inference.ApproximateInference |
computeRMSE, getRMSEWriter, setRMSEfile |
Methods inherited from class edu.ksu.cis.bnj.bbn.inference.Inference |
execute, getCurrentOptions, getGraph, getMAP, getMarginals, getMarginalsResult, getMPE, getName, getOutputFile, getRunType, load, setGraph, setOption, setOptions, setOutputFile, setRunType |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.ksu.cis.bnj.bbn.datagen.DataGenerator |
getName |
Field Detail |
protected static final java.lang.String OPT_MAX_ITERATION
protected static final java.lang.String OPT_USE_MARKOV_BLANKET
protected static final java.lang.String OPT_GENERATE_DATA
protected static final java.lang.String OPT_RUNNING_TIME_LIMIT
public static final int defaultMaxIteration
public static final long NO_TIME_LIMIT
protected static MersenneTwisterFast random
protected long runningTimeLimit
protected boolean abort
protected java.util.Timer abortTimer
protected int maxIteration
protected boolean useMarkovBlanketScore
protected boolean generateSamples
protected Table tuples
protected java.util.LinkedList listeners
Constructor Detail |
public MCMC()
public MCMC(BBNGraph g)
g
- Method Detail |
public void addListener(MCMCListener l)
protected void sendEvent(MCMCEvent e)
public void removeListener(MCMCListener l)
public java.util.Hashtable getMarkovBlanketScore(BBNNode n, java.util.Hashtable chosen)
n
- The node we want to have the Markov blanket scored uponchosen
- The chosen values so far
public Table getData()
public void generateData(boolean d)
public Table generateData(int howmuch)
DataGenerator
generateData
in interface DataGenerator
howmuch
- The number
DataGenerator.generateData(int)
public boolean isUseMarkovBlanketScore()
public void setUseMarkovBlanketScore(boolean useMarkovBlanketScore)
useMarkovBlanketScore
- The useMarkovBlanketScore to setpublic int getMaxIteration()
public void setMaxIteration(int maxIteration)
maxIteration
- The maxIteration to setpublic java.util.Hashtable getDefaultOptions()
getDefaultOptions
in interface Optionable
getDefaultOptions
in class Inference
Optionable.getDefaultOptions()
public OptionGUI getOptionsDialog()
getOptionsDialog
in interface Optionable
getOptionsDialog
in class Inference
public void setRunningTimeLimit(long mseconds)
public long getRunningTimeLimit()
protected void setAbortTimer()
protected void cancelAbortTimer()
protected void abort()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |