Class Ling

java.lang.Object
edu.cmu.tetrad.search.Ling

public class Ling extends Object
The code used within this class is largely Gustave Lacerda's, which corresponds to his essay, Discovering Cyclic Causal Models by Independent Components Analysis. The code models the LiNG algorithm.

Note: This code is currently broken; please do not use it until it's fixed. 11/24/2015> 0

  • Constructor Details

    • Ling

      public Ling(DataSet d)
      The algorithm only requires a DataSet to process. Passing in a Dataset and then running the search algorithm is an effetive way to use LiNG.
      Parameters:
      d - a DataSet over which the algorithm can process
    • Ling

      public Ling(GraphWithParameters graphWP, int samples)
      When you don't have a Dataset, supply a GraphWithParameters and the number of samples to draw and the algorithm will generate a DataSet.
      Parameters:
      graphWP - a graph with parameters from GraphWithParameters
      samples - the number of samples the algorithm draws in order to generate a DataSet
    • Ling

      public Ling(Graph g, int samples)
      When you don't have a Dataset, supply a Graph and the number of samples to draw and the algorithm will generate a DataSet.
      Parameters:
      g - a graph from Graph
      samples - the number of samples the algorithm draws in order to generate a DataSet
  • Method Details

    • getData

      public DataSet getData()
      Returns:
      DataSet Returns a dataset of the data used by the algorithm.
    • search

      public Ling.StoredGraphs search()
      The search method is used to process LiNG. Call search when you want to run the algorithm.
    • ngFullData

      public double ngFullData(int rowIndex, Matrix data, Matrix W)
    • getElapsedTime

      public long getElapsedTime()
      Calculates the time used when processing the search method.
    • setThreshold

      public void setThreshold(double t)
      Sets the value at which thresholding occurs on Fast ICA data. Default is .05.
      Parameters:
      t - The value at which the thresholding is set
    • pruneEdgesByResampling

      public Matrix pruneEdgesByResampling(Matrix data)
      This is the method used in Patrik's code.