Class FaskPool

java.lang.Object
edu.cmu.tetrad.algcomparison.algorithm.multi.FaskPool
All Implemented Interfaces:
Algorithm, MultiDataSetAlgorithm, AcceptsKnowledge, HasParameters, TakesExternalGraph, TakesScoreWrapper, TetradSerializable, Serializable

Wraps the pooled-FASK multi-dataset algorithm for continuous variables. A graph-based stage supplies the common adjacency structure—IMaGES, another pooled adjacency search, or one external graph per dataset, combined—and each adjacency is oriented by the sign of the FASK left-right statistic pooled across the datasets (sample-size weighted by default), rather than by voting on per-dataset orientations as FASK-Vote does. Where the graph stage compels a direction, that direction is kept as a default orientation that the pooled statistic can overturn only on strong opposing signal.
Version:
$Id: $Id
Author:
josephramsey
See Also:
  • Constructor Details

    • FaskPool

      public FaskPool()

      Constructor for FaskPool.

    • FaskPool

      public FaskPool(ScoreWrapper score)

      Constructor for FaskPool.

      Parameters:
      score - a ScoreWrapper object
  • Method Details

    • search

      public Graph search(List<DataModel> dataSets, Parameters parameters) throws InterruptedException
      Runs the search.
      Specified by:
      search in interface MultiDataSetAlgorithm
      Parameters:
      dataSets - The data sets.
      parameters - The parameters.
      Returns:
      The graph.
      Throws:
      InterruptedException - if any.
    • search

      public Graph search(DataModel dataSet, Parameters parameters) throws InterruptedException
      Runs the search.
      Specified by:
      search in interface Algorithm
      Parameters:
      dataSet - The data set to run to the search on.
      parameters - The paramters of the search.
      Returns:
      The result graph.
      Throws:
      InterruptedException - if any.
    • getComparisonGraph

      public Graph getComparisonGraph(Graph graph)
      Returns that graph that the result should be compared to.
      Specified by:
      getComparisonGraph in interface Algorithm
      Parameters:
      graph - The true directed graph, if there is one.
      Returns:
      The comparison graph.
    • getDescription

      public String getDescription()
      Returns a short, one-line description of this algorithm. This will be printed in the report.
      Specified by:
      getDescription in interface Algorithm
      Returns:
      This description.
    • getDataType

      public DataType getDataType()
      Returns the data type that the search requires, whether continuous, discrete, or mixed.
      Specified by:
      getDataType in interface Algorithm
      Returns:
      This type.
    • getParameters

      public List<String> getParameters()
      Returns the list of parameter names that are used. These are looked up in ParamMap, so if they're not

      Returns the IMaGES parameters, minus OUTPUT_CPDAG: FASK-Pool takes the compelled orientations of the IMaGES CPDAG as evidence whether or not BOSS is asked to output a CPDAG (a DAG is converted to its CPDAG first), so the setting is irrelevant. FASK_POOL_ADJACENCY chooses the adjacency search (1 = IMaGES, 2 = pooled FAS, 3 = MG-FAS, 4 = MG-LiNG, 5 = intersection of 3 and 4); ALPHA and DEPTH govern the FAS-style tests, and THRESHOLD_B with the FastICA parameters governs the LiNG stage. FASK_POOL_ADJACENCY_ORIENTATIONS (default true) makes the IMaGES CPDAG's compelled orientations act as default orientations, overturnable only on strict cross-dataset sign consensus of the left-right statistic; the other adjacency methods produce undirected graphs, for which it has no effect. FASK_POOL_EXTERNAL_ORIENTATIONS (default true) does the same for supplied external graphs, which are estimated one per dataset and combined, and FASK_POOL_EXTERNAL_ADJACENCY_FRACTION (default 0.5) sets how many of them a pair must be adjacent in to enter the composite skeleton. TWO_CYCLE_ALPHA (default 0 = off) enables per-dataset two-cycle tests requiring unanimity across datasets; ORIENTATION_ALPHA (default 0) sets the bootstrap significance gate on orientation decisions, which with a single dataset is the only meaningful gate on the override. No other FASK single-dataset parameters are listed because there is no skew-adjacency stage in this setting.

      Specified by:
      getParameters in interface HasParameters
      Returns:
      Returns the list of parameter names that are used. These are looked up in ParamMap, so if they're not already defined they'll need to be defined there.
    • setExternalGraph

      public void setExternalGraph(Algorithm algorithm)

      setExternalGraph.

      Sets the algorithm supplying the external graphs. It is run separately on each dataset (unless it is itself a multi-dataset algorithm, which is run once on all of them), and the resulting graphs are combined. Null is accepted: external graphs are optional for FASK-Pool, and without them the adjacency search selected by FASK_POOL_ADJACENCY runs as before. Note that a fixed source graph from the interface returns the same graph for every dataset, which is logged, since such a graph carries no cross-dataset evidence.

      Specified by:
      setExternalGraph in interface TakesExternalGraph
      Parameters:
      algorithm - a Algorithm object
    • getKnowledge

      public Knowledge getKnowledge()
      Returns a knowledge object.
      Specified by:
      getKnowledge in interface AcceptsKnowledge
      Returns:
      a knowledge object.
    • setKnowledge

      public void setKnowledge(Knowledge knowledge)
      Sets a knowledge object.
      Specified by:
      setKnowledge in interface AcceptsKnowledge
      Parameters:
      knowledge - a knowledge object.
    • getScoreWrapper

      public ScoreWrapper getScoreWrapper()
      Returns the score wrapper.
      Specified by:
      getScoreWrapper in interface TakesScoreWrapper
      Returns:
      the score wrapper.
    • setScoreWrapper

      public void setScoreWrapper(ScoreWrapper score)
      Sets a score wrapper if not null.
      Specified by:
      setScoreWrapper in interface MultiDataSetAlgorithm
      Specified by:
      setScoreWrapper in interface TakesScoreWrapper
      Parameters:
      score - The wrapper