Class Bpc
This implementation follows the spirit of the paper: 1) Identify candidate pure groups using tetrads (quartets) and within-group dependence. 2) Grow each seed to a local maximal pure group, but DO NOT mark variables as used. 3) Perform global purification/merging passes: - Merge groups when their union remains pure. - Resolve overlaps by globally assigning shared variables to the most compatible group. - Iterate until convergence. 4) Drop groups with fewer than 3 indicators (paperâs Step: remove latents with < 3 children).
Notes: - We keep pairwise dependence as a simple Fisher-Z check on correlations. - Purification/overlap resolution uses correlation-based tie-breaking; the paper gives several logically equivalent global rulesâthis is a practical, deterministic variant.
-
Constructor Summary
ConstructorsConstructorDescriptionBpc(CovarianceMatrix cov, double alpha, int ess) Constructor for the Bpc class. -
Method Summary
Modifier and TypeMethodDescriptionIdentifies clusters of variables based on tetrad purity and pairwise dependence.voidsetVerbose(boolean verbose) Enables or disables verbose logging for the Bpc instance.
-
Constructor Details
-
Bpc
Constructor for the Bpc class.- Parameters:
cov- A CovarianceMatrix containing the data to be used for clustering and correlation analysis.alpha- The significance level for tetrad tests, used to determine the tolerance for statistical independence.ess- The effective sample size (ESS) which can be set to -1 (indicating sample size) or a positive integer. The chosen ESS impacts statistical decisions during the analysis.- Throws:
IllegalArgumentException- if the ess parameter is not -1 or a positive integer.
-
-
Method Details
-
getClusters
Identifies clusters of variables based on tetrad purity and pairwise dependence. Constructs initial clusters as locally maximal pure groups and refines them using global purification, merging, and overlap resolution until convergence.- Returns:
- A list of clusters where each cluster is represented as a list of variable indices. Each cluster satisfies purity and pairwise dependence constraints, and all groups are disjoint after resolving overlaps. Returns an empty list if no valid clusters exist.
-
setVerbose
public void setVerbose(boolean verbose) Enables or disables verbose logging for the Bpc instance.- Parameters:
verbose- A boolean indicating whether verbose logging should be enabled (true) or disabled (false).
-