edu.ksu.cis.bnj.bbn.learning.scorebased.gradient
Class HillClimbingSL
java.lang.Object
edu.ksu.cis.bnj.bbn.learning.Learner
edu.ksu.cis.bnj.bbn.learning.ScoreBasedLearner
edu.ksu.cis.bnj.bbn.learning.scorebased.gradient.HillClimbingSL
- All Implemented Interfaces:
- Optionable
- Direct Known Subclasses:
- HillClimbingARSL, HillClimbingDPSL
- public class HillClimbingSL
- extends ScoreBasedLearner
- Author:
- Julie Thornton
Hill climbing algorithm for BN structure learning
Methods inherited from class edu.ksu.cis.bnj.bbn.learning.Learner |
getCalculateRMSE, getCurrentOptions, getData, getDefaultOptions, getName, getOptionsDialog, getOutputFile, initialize, isCalculateCPT, load, populateNodes, processParameters, setCalculateCPT, setCalculateRMSE, setData, setOption, setOptions, setOutputFile |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bbnGraph
protected BBNGraph bbnGraph
inputFile
public java.lang.String inputFile
parentTable
protected java.util.Set[] parentTable
path
protected boolean[][] path
errors
public java.util.Vector[] errors
numOfNodes
protected int numOfNodes
numOfChanges
protected int numOfChanges
totalNumOfChanges
protected int totalNumOfChanges
tempScore
protected double tempScore
previousScore
protected double previousScore
maxScore
protected double maxScore
recentChange
protected int recentChange
CYCLE
public static final boolean CYCLE
- See Also:
- Constant Field Values
containsCycle
public boolean containsCycle
minNumChanges
public int minNumChanges
maxParents
protected int maxParents
REVERSED
public static final int REVERSED
- See Also:
- Constant Field Values
REMOVED
public static final int REMOVED
- See Also:
- Constant Field Values
ADDED
public static final int ADDED
- See Also:
- Constant Field Values
NA
public static final int NA
- See Also:
- Constant Field Values
allGraphs
protected java.util.Vector allGraphs
allGraphScores
protected java.util.Vector allGraphScores
curErrors
public java.util.Vector curErrors
errorType
public java.lang.String errorType
HillClimbingSL
public HillClimbingSL()
HillClimbingSL
public HillClimbingSL(Data data)
getGraph
public BBNGraph getGraph()
- Description copied from class:
Learner
- The learning algorithm is here
- Specified by:
getGraph
in class Learner
- Returns:
- BBNGraph
learnGraph
protected void learnGraph()
getNetworkScore
public double getNetworkScore()
initializeGraph
public void initializeGraph()
initializeNodes
public void initializeNodes()
initializePossibleParents
public void initializePossibleParents()
initializeNodeParents
public void initializeNodeParents()
resetCPT
public void resetCPT()
addParentsToGraph
public void addParentsToGraph()
setGoldGraph
public void setGoldGraph(java.lang.String g)
setResultsFile
public void setResultsFile(java.lang.String file)
printErrors
public void printErrors()
main
public static void main(java.lang.String[] args)