Class R2
java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
edu.cmu.tetrad.algcomparison.algorithm.pairwise.R2
- All Implemented Interfaces:
Algorithm
,ReturnsBootstrapGraphs
,HasParameters
,TakesExternalGraph
,TetradSerializable
,Serializable
@Bootstrapping
public class R2
extends AbstractBootstrapAlgorithm
implements Algorithm, TakesExternalGraph
R2.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetComparisonGraph
(Graph graph) Returns a comparison graph for the given true directed graph.Returns the data type required for the search, whether continuous, discrete, or mixed.Returns the description of the algorithm.Retrieves the list of parameters for the current instance of the class.runSearch
(DataModel dataModel, Parameters parameters) Runs the search algorithm using the provided data model and parameters.void
setExternalGraph
(Algorithm algorithm) Sets the external graph for the algorithm.Methods inherited from class edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
getBootstrapGraphs, search
-
Constructor Details
-
R2
public R2()Constructor for R2.
-
R2
-
-
Method Details
-
runSearch
Runs the search algorithm using the provided data model and parameters.- Parameters:
dataModel
- The data model containing the dataset to search.parameters
- The parameters to be used for the search algorithm.- Returns:
- The graph result of the search algorithm.
- Throws:
IllegalArgumentException
- if the data model is not a continuous dataset, or if the search algorithm does not find a graph result.InterruptedException
-
getComparisonGraph
Returns a comparison graph for the given true directed graph.- Specified by:
getComparisonGraph
in interfaceAlgorithm
- Parameters:
graph
- The true directed graph, if there is one.- Returns:
- A comparison graph representing the true directed graph.
-
getDescription
Returns the description of the algorithm.- Specified by:
getDescription
in interfaceAlgorithm
- Returns:
- The description of the algorithm.
-
getDataType
Returns the data type required for the search, whether continuous, discrete, or mixed.- Specified by:
getDataType
in interfaceAlgorithm
- Returns:
- The data type required for the search.
-
getParameters
Retrieves the list of parameters for the current instance of the class.- Specified by:
getParameters
in interfaceHasParameters
- Returns:
- A list of parameter names used by the algorithm. If the algorithm does not have any parameters, an empty list is returned.
-
setExternalGraph
Sets the external graph for the algorithm.- Specified by:
setExternalGraph
in interfaceTakesExternalGraph
- Parameters:
algorithm
- aAlgorithm
object representing the external graph to be set- Throws:
IllegalArgumentException
- if the algorithm is null
-