Package edu.cmu.tetrad.sem
Class Ricf
java.lang.Object
edu.cmu.tetrad.sem.Ricf
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe fit con graph result.static classRICF result. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncliques.static doublelogLikMAG(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.ricf(SemGraph mag, ICovarianceMatrix covMatrix, double tolerance) Calculates the Restricted Information Criterion Fusion (RICF) for a given SemGraph.ricf2(Graph mag, ICovarianceMatrix covMatrix, double tolerance) Same as above but takes a Graph instead of a SemGraph
-
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 anICovarianceMatrixobject.- Returns:
- The computed log-likelihood value as a double.
-
ricf
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
Same as above but takes a Graph instead of a SemGraph- Parameters:
mag- aGraphobjectcovMatrix- aICovarianceMatrixobjecttolerance- a double- Returns:
- a
Ricf.RicfResultobject
-
cliques
cliques.
- Parameters:
graph- aGraphobject- Returns:
- an enumeration of the cliques of the given graph considered as undirected.
-