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
,UsesScoreWrapper
,TetradSerializable
,Serializable
@Bootstrapping
@Algorithm(name="FASK-Orig",
command="fask-orig",
algoType=forbid_latent_common_causes,
dataType=Continuous)
@Experimental
public class FaskOrig
extends AbstractBootstrapAlgorithm
implements Algorithm, HasKnowledge, UsesScoreWrapper, 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.void
setExternalGraph
(Algorithm algorithm) Sets the external graph to be used by the algorithm.void
setIndependenceWrapper
(IndependenceWrapper independenceWrapper) Sets the independence wrapper for the object.void
setKnowledge
(Knowledge knowledge) Sets the knowledge associated with this object.void
setScoreWrapper
(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
- aIndependenceWrapper
objectscore
- aScoreWrapper
object
-
-
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:
getComparisonGraph
in 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:
getDescription
in 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:
getDataType
in 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:
getParameters
in interfaceHasParameters
- Returns:
- The list of parameter names used by the algorithm.
-
getKnowledge
Retrieves the knowledge associated with this object.- Specified by:
getKnowledge
in interfaceHasKnowledge
- Returns:
- The knowledge.
-
setKnowledge
Sets the knowledge associated with this object.- Specified by:
setKnowledge
in interfaceHasKnowledge
- Parameters:
knowledge
- The knowledge object to be set.
-
getIndependenceWrapper
Retrieves the IndependenceWrapper associated with this object.- Specified by:
getIndependenceWrapper
in interfaceTakesIndependenceWrapper
- Returns:
- The IndependenceWrapper object.
-
setIndependenceWrapper
Sets the independence wrapper for the object.- Specified by:
setIndependenceWrapper
in interfaceTakesIndependenceWrapper
- Parameters:
independenceWrapper
- the independence wrapper to be set. Must implement theIndependenceWrapper
interface.
-
setExternalGraph
Sets the external graph to be used by the algorithm.- Specified by:
setExternalGraph
in interfaceTakesExternalGraph
- Parameters:
algorithm
- The algorithm object.
-
getScoreWrapper
Retrieves the ScoreWrapper object associated with this class.- Specified by:
getScoreWrapper
in interfaceUsesScoreWrapper
- Returns:
- The ScoreWrapper object.
-
setScoreWrapper
Sets the score wrapper for the object.- Specified by:
setScoreWrapper
in interfaceUsesScoreWrapper
- Parameters:
score
- the score wrapper to be set.
-