Class FaskOrig
java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
edu.cmu.tetrad.algcomparison.algorithm.continuous.dag.FaskOrig
- All Implemented Interfaces:
Algorithm,ReturnsBootstrapGraphs,HasKnowledge,HasParameters,TakesExternalGraph,TakesIndependenceWrapper,TakesScoreWrapper,TetradSerializable,Serializable
@Bootstrapping
public class FaskOrig
extends AbstractBootstrapAlgorithm
implements Algorithm, HasKnowledge, TakesScoreWrapper, TakesIndependenceWrapper, TakesExternalGraph
The FaskOrig class is an implementation of the FASK-Orig algorithm for causal discovery. It searches for causal
relationships among variables in a dataset using the given independence test and score functions.
This is the code before cleaning it up on 2024-5-16.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionFaskOrig()Constructor for Fask.FaskOrig(IndependenceWrapper test, ScoreWrapper score) Constructor for Fask. -
Method Summary
Modifier and TypeMethodDescriptiongetComparisonGraph(Graph graph) Returns a comparison graph based on the true directed graph, if there is one.Retrieves the data type of the dataset.Returns a short, one-line description of the FASK algorithm.Retrieves the IndependenceWrapper associated with this object.Retrieves the knowledge associated with this object.Returns the list of parameter names that are used by the algorithm.Retrieves the ScoreWrapper object associated with this class.runSearch(DataModel dataModel, Parameters parameters) Runs the Fask search algorithm on the given data model with the specified parameters.voidsetExternalGraph(Algorithm algorithm) Sets the external graph to be used by the algorithm.voidsetIndependenceWrapper(IndependenceWrapper independenceWrapper) Sets the independence wrapper for the object.voidsetKnowledge(Knowledge knowledge) Sets the knowledge associated with this object.voidsetScoreWrapper(ScoreWrapper score) Sets the score wrapper for the object.Methods inherited from class edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
getBootstrapGraphs, search
-
Constructor Details
-
FaskOrig
public FaskOrig()Constructor for Fask.
-
FaskOrig
Constructor for Fask.
- Parameters:
test- aIndependenceWrapperobjectscore- aScoreWrapperobject
-
-
Method Details
-
runSearch
Runs the Fask search algorithm on the given data model with the specified parameters.- Parameters:
dataModel- the data model to run the search onparameters- the parameters for the search- Returns:
- the resulting graph from the search
- Throws:
IllegalStateException- if the data model is not a DataSet or if there are missing valuesIllegalArgumentException- if there are missing values in the data setInterruptedException
-
getComparisonGraph
Returns a comparison graph based on the true directed graph, if there is one.- Specified by:
getComparisonGraphin interfaceAlgorithm- Parameters:
graph- The true directed graph, if there is one.- Returns:
- A comparison graph.
-
getDescription
Returns a short, one-line description of the FASK algorithm. This description will be printed in the report.- Specified by:
getDescriptionin interfaceAlgorithm- Returns:
- A short description of the FASK algorithm.
- Throws:
IllegalStateException- if the FASK algorithm is not initialized with either a test or an algorithm.
-
getDataType
Retrieves the data type of the dataset.- Specified by:
getDataTypein interfaceAlgorithm- Returns:
- The data type of the dataset.
-
getParameters
Returns the list of parameter names that are used by the algorithm. These parameters are looked up in the ParamMap, so if they are not already defined, they will need to be defined there.- Specified by:
getParametersin interfaceHasParameters- Returns:
- The list of parameter names used by the algorithm.
-
getKnowledge
Retrieves the knowledge associated with this object.- Specified by:
getKnowledgein interfaceHasKnowledge- Returns:
- The knowledge.
-
setKnowledge
Sets the knowledge associated with this object.- Specified by:
setKnowledgein interfaceHasKnowledge- Parameters:
knowledge- The knowledge object to be set.
-
getIndependenceWrapper
Retrieves the IndependenceWrapper associated with this object.- Specified by:
getIndependenceWrapperin interfaceTakesIndependenceWrapper- Returns:
- The IndependenceWrapper object.
-
setIndependenceWrapper
Sets the independence wrapper for the object.- Specified by:
setIndependenceWrapperin interfaceTakesIndependenceWrapper- Parameters:
independenceWrapper- the independence wrapper to be set. Must implement theIndependenceWrapperinterface.
-
setExternalGraph
Sets the external graph to be used by the algorithm.- Specified by:
setExternalGraphin interfaceTakesExternalGraph- Parameters:
algorithm- The algorithm object.
-
getScoreWrapper
Retrieves the ScoreWrapper object associated with this class.- Specified by:
getScoreWrapperin interfaceTakesScoreWrapper- Returns:
- The ScoreWrapper object.
-
setScoreWrapper
Sets the score wrapper for the object.- Specified by:
setScoreWrapperin interfaceTakesScoreWrapper- Parameters:
score- the score wrapper to be set.
-