Class Ricf

java.lang.Object
edu.cmu.tetrad.sem.Ricf

public class Ricf extends Object
Implements ICF as specified in Drton and Richardson (2003), Iterative Conditional Fitting for Gaussian Ancestral Graph Models, using hints from previous implementations by Drton in the ggm package in R and by Silva in the Purify class. The reason for reimplementing in this case is to take advantage of linear algebra optimizations in the COLT library.
Version:
$Id: $Id
Author:
josephramsey
  • Constructor Details

    • Ricf

      public Ricf()
      Represents the Ricf class. This class provides methods for calculating the Restricted Information Criterion Fusion (RICF) for a given SemGraph.
  • Method Details

    • logLikMAG

      public static double logLikMAG(cern.colt.matrix.DoubleMatrix2D B, cern.colt.matrix.DoubleMatrix2D Omega, cern.colt.matrix.DoubleMatrix2D Lambda, int[] ug, ICovarianceMatrix covMatrix)
      Calculates the log-likelihood for a Mixed Ancestral Graph (MAG) model given the input matrices and provides a measure of model fit.
      Parameters:
      B - The matrix representing the structural causal relationships in the MAG model.
      Omega - The covariance matrix for the observed variables in the non-latent part of the model.
      Lambda - The precision matrix for the latent variables in the model.
      ug - An array of indices representing the latent (unobserved) variables in the model.
      covMatrix - The covariance matrix of the observed data, represented as an ICovarianceMatrix object.
      Returns:
      The computed log-likelihood value as a double.
    • ricf

      public Ricf.RicfResult ricf(SemGraph mag, ICovarianceMatrix covMatrix, double tolerance)
      Calculates the Restricted Information Criterion Fusion (RICF) for a given SemGraph.
      Parameters:
      mag - The SemGraph object representing the graph to calculate RICF for.
      covMatrix - The ICovarianceMatrix object representing the covariance matrix.
      tolerance - The tolerance value for convergence.
      Returns:
      The RicfResult object containing the results of the RICF calculation.
    • ricf2

      public Ricf.RicfResult ricf2(Graph mag, ICovarianceMatrix covMatrix, double tolerance)
      Same as above but takes a Graph instead of a SemGraph
      Parameters:
      mag - a Graph object
      covMatrix - a ICovarianceMatrix object
      tolerance - a double
      Returns:
      a Ricf.RicfResult object
    • cliques

      public List<List<Node>> cliques(Graph graph)

      cliques.

      Parameters:
      graph - a Graph object
      Returns:
      an enumeration of the cliques of the given graph considered as undirected.