Class Skew
java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
edu.cmu.tetrad.algcomparison.algorithm.pairwise.Skew
- All Implemented Interfaces:
Algorithm
,ReturnsBootstrapGraphs
,HasParameters
,TakesExternalGraph
,TetradSerializable
,Serializable
@Algorithm(name="Skew",
command="skew",
algoType=orient_pairwise,
dataType=Continuous)
@Bootstrapping
public class Skew
extends AbstractBootstrapAlgorithm
implements Algorithm, TakesExternalGraph
Skew.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
Constructors -
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 current algorithm.Returns a description of the method.Retrieves the list of parameter names that are used by this method and its associated algorithm.runSearch
(DataModel dataModel, Parameters parameters) Runs the search algorithm to orient edges in the input graph using the given data model and parameters.void
setExternalGraph
(Algorithm algorithm) Sets the external graph to be used by the algorithm.Methods inherited from class edu.cmu.tetrad.algcomparison.algorithm.AbstractBootstrapAlgorithm
getBootstrapGraphs, search
-
Constructor Details
-
Skew
public Skew()Constructor for Skew.
-
Skew
-
-
Method Details
-
runSearch
Runs the search algorithm to orient edges in the input graph using the given data model and parameters.- Parameters:
dataModel
- The data model representing the data set. It must be a continuous data set.parameters
- The parameters for the search algorithm.- Returns:
- The oriented graph produced by the search algorithm.
- Throws:
IllegalArgumentException
- If the data model is not a continuous data set or if the search algorithm fails to produce a graph.InterruptedException
-
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 description of the method.- Specified by:
getDescription
in interfaceAlgorithm
- Returns:
- A string representing the description of the method. If the algorithm is not null, it appends the initial graph description from the algorithm.
-
getDataType
Retrieves the data type of the current algorithm.- Specified by:
getDataType
in interfaceAlgorithm
- Returns:
- The data type of the algorithm. It can be one of the following: - Continuous: if all variables in the data set are continuous - Discrete: if all variables in the data set are discrete - Mixed: if the data set contains a mix of continuous and discrete variables - Graph: if the algorithm produces a graph as the result - Covariance: if the algorithm requires a covariance matrix as input - All: if the data type is not known or if the algorithm can handle any data type
-
getParameters
Retrieves the list of parameter names that are used by this method and its associated algorithm.- Specified by:
getParameters
in interfaceHasParameters
- Returns:
- A list of parameter names. If the associated algorithm has parameters, they are included in the list. Additionally, the parameter name "VERBOSE" is always added to the list.
-
setExternalGraph
Sets the external graph to be used by the algorithm.- Specified by:
setExternalGraph
in interfaceTakesExternalGraph
- Parameters:
algorithm
- The algorithm object representing the external graph. Must implement theAlgorithm
interface.- Throws:
IllegalArgumentException
- If the algorithm is null.
-