Package edu.cmu.tetrad.search.utils
Class FgesOrienter
java.lang.Object
edu.cmu.tetrad.search.utils.FgesOrienter
- All Implemented Interfaces:
- IGraphSearch,- DagScorer
This Orients a given undirected graph such that the edges in the graph are a superset of the edges in the oriented
 graph, using FGES method.
- Author:
- AJ Sedgewick, 5/2015
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionFgesOrienter(DataSet dataSet) The data set must either be all continuous or all discrete.
- 
Method SummaryModifier and TypeMethodDescriptionintgetDepth()longgetOut()doubleFor BIC score, a multiplier on the penalty term.doublebooleanbooleanisLog()True iff log output should be produced.voiddoubleScores the given DAG, up to a constant.search()Greedy equivalence search: Start from the empty graph, add edges till model is significant.voidsetAdjacencies(Graph adjacencies) Sets the set of preset adjacenies for the algorithm; edges not in this adjacencies graph will not be added.voidsetDepth(int depth) -1 for unlimited depth, otherwise a number >= 0.voidsetDiscreteScore(DiscreteScore DiscreteScore) Sets the discrete scoring function to use.voidsetExternalGraph(Graph externalGraph) Sets the initial graph.voidsetFaithfulnessAssumed(boolean faithfulness) Set to true if it is assumed that all path pairs with one length 1 path do not cancelAll.voidsetKnowledge(Knowledge knowledge) Sets the background knowledge.voidsetLog(boolean log) Sets whether log output should be produced.voidsetOut(PrintStream out) Sets the output stream that output (except for log output) should be sent to.voidsetPenaltyDiscount(double penaltyDiscount) For BIC score, a multiplier on the penalty term.voidsetSamplePrior(double samplePrior) For BDeu score for discrete search; see Chickering (2002).voidsetStructurePrior(double structurePrior) For BDeu score for discrete search; see Chickering (2002).voidsetTrueGraph(Graph trueGraph) If the true graph is set, askterisks will be printed in log output for the true edges.voidsetVerbose(boolean verbose) Sets whether verbose output should be produced.
- 
Constructor Details- 
FgesOrienterThe data set must either be all continuous or all discrete.
 
- 
- 
Method Details- 
orient
- 
isFaithfulnessAssumedpublic boolean isFaithfulnessAssumed()- Returns:
- true if it is assumed that all path pairs with one length 1 path do not cancelAll.
 
- 
setFaithfulnessAssumedpublic void setFaithfulnessAssumed(boolean faithfulness) Set to true if it is assumed that all path pairs with one length 1 path do not cancelAll.
- 
searchGreedy equivalence search: Start from the empty graph, add edges till model is significant. Then start deleting edges till a minimum is achieved.- Specified by:
- searchin interface- IGraphSearch
- Returns:
- the resulting CPDAG.
 
- 
getKnowledge- Returns:
- the background knowledge.
 
- 
setKnowledgeSets the background knowledge.- Parameters:
- knowledge- the knowledge object, specifying forbidden and required edges.
 
- 
setStructurePriorpublic void setStructurePrior(double structurePrior) For BDeu score for discrete search; see Chickering (2002).
- 
setSamplePriorpublic void setSamplePrior(double samplePrior) For BDeu score for discrete search; see Chickering (2002).
- 
getElapsedTimepublic long getElapsedTime()
- 
getPenaltyDiscountpublic double getPenaltyDiscount()For BIC score, a multiplier on the penalty term. For continuous searches.
- 
setPenaltyDiscountpublic void setPenaltyDiscount(double penaltyDiscount) For BIC score, a multiplier on the penalty term. For continuous searches.
- 
setTrueGraphIf the true graph is set, askterisks will be printed in log output for the true edges.
- 
getScore- Returns:
- the score of the given DAG, up to a constant.
 
- 
getDiscreteScore- Returns:
- the discrete scoring function being used. By default, BDeu.
 
- 
setDiscreteScoreSets the discrete scoring function to use.
- 
isLogpublic boolean isLog()True iff log output should be produced.
- 
setLogpublic void setLog(boolean log) Sets whether log output should be produced. Set to false a faster search.
- 
getExternalGraph- Returns:
- the initial graph for the search. The search is initialized to this graph and proceeds from there.
 
- 
setExternalGraphSets the initial graph.
- 
setVerbosepublic void setVerbose(boolean verbose) Sets whether verbose output should be produced.
- 
getOut- Returns:
- the output stream that output (except for log output) should be sent to.
 
- 
setOutSets the output stream that output (except for log output) should be sent to. By detault System.out.
- 
getAdjacencies- Returns:
- the set of preset adjacenies for the algorithm; edges not in this adjacencies graph will not be added.
 
- 
setAdjacenciesSets the set of preset adjacenies for the algorithm; edges not in this adjacencies graph will not be added.
- 
getDepthpublic int getDepth()- Returns:
- the depth for the forward reevaluation step.
 
- 
setDepthpublic void setDepth(int depth) -1 for unlimited depth, otherwise a number >= 0. In the forward reevaluation step, subsets of neighbors up to depth in size are considered. Limiting depth can speed up the algorithm.
- 
scoreDagScores the given DAG, up to a constant.
 
-