Class BpcBlockDiscoverer

java.lang.Object
edu.cmu.tetrad.search.blocks.BpcBlockDiscoverer
All Implemented Interfaces:
BlockDiscoverer

public class BpcBlockDiscoverer extends Object implements BlockDiscoverer
The BpcBlockDiscoverer class is an implementation of the BlockDiscoverer interface, designed to discover clusters or "blocks" of indices within a dataset using the BPC (Bayesian Partitioning for Causal Discovery) algorithm. This class leverages statistical testing and clustering policies to identify and refine meaningful groupings of variables.

The discovery process involves utilizing BPC with a specified statistical test, significance threshold, and equivalent sample size to generate initial clusters. These clusters are then adjusted and validated according to predefined policies and canonicalization techniques.

Core functionality: - Discovers blocks of indices from a dataset using the BPC algorithm. - Validates and canonicalizes the resulting clusters to ensure consistency and correctness. - Applies a single-cluster policy to manage merging or refinement of blocks based on the given policy.

Constructor parameters: - dataSet: The data on which block discovery is performed. - ntadTest: The statistical test used by the BPC algorithm. - alpha: The significance threshold for the statistical test in BPC. - ess: The equivalent sample size parameter used in the BPC algorithm. - policy: The policy applied to adjust or refine single clusters during block discovery.

  • Constructor Summary

    Constructors
    Constructor
    Description
    BpcBlockDiscoverer(DataSet dataSet, double alpha, int ess, SingletonClusterPolicy policy, boolean verbose)
    Constructor for the BpcBlockDiscoverer class, responsible for initiating the discovery of clusters or blocks of indices within a dataset using the BPC (Bayesian Partitioning for Causal Discovery) algorithm.
    BpcBlockDiscoverer(DataSet dataSet, CovarianceMatrix pooledCovariance, double alpha, int ess, SingletonClusterPolicy policy, boolean verbose)
    Constructs a BpcBlockDiscoverer over a pooled covariance matrix--for example, the averaged covariance of several imputations of a data set with missing values (see BlocksUtil.pooledCovariance).
  • Method Summary

    Modifier and Type
    Method
    Description
    Discovers and returns the specification of blocks (clusters of indices) within the dataset using the Bayesian Partitioning for Causal Discovery (BPC) algorithm.

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BpcBlockDiscoverer

      public BpcBlockDiscoverer(DataSet dataSet, double alpha, int ess, SingletonClusterPolicy policy, boolean verbose)
      Constructor for the BpcBlockDiscoverer class, responsible for initiating the discovery of clusters or blocks of indices within a dataset using the BPC (Bayesian Partitioning for Causal Discovery) algorithm.
      Parameters:
      dataSet - the dataset on which block discovery is performed
      alpha - the significance threshold for the statistical test in BPC
      ess - the equivalent sample size parameter used in the BPC algorithm
      policy - the policy applied to adjust or refine single clusters during block discovery
      verbose - flag indicating whether verbose output should be generated during the discovery process
    • BpcBlockDiscoverer

      public BpcBlockDiscoverer(DataSet dataSet, CovarianceMatrix pooledCovariance, double alpha, int ess, SingletonClusterPolicy policy, boolean verbose)
      Constructs a BpcBlockDiscoverer over a pooled covariance matrix--for example, the averaged covariance of several imputations of a data set with missing values (see BlocksUtil.pooledCovariance). The representative data set anchors the resulting BlockSpec and must have the same variables, in the same order, as the pooled matrix.
      Parameters:
      dataSet - The representative data set for the resulting BlockSpec.
      pooledCovariance - The covariance matrix to run the algorithm on, or null to compute it from the data set.
      alpha - The significance level for the statistical tests.
      ess - The equivalent sample size.
      policy - The single-cluster policy.
      verbose - Whether verbose output is enabled.
  • Method Details

    • discover

      public BlockSpec discover()
      Discovers and returns the specification of blocks (clusters of indices) within the dataset using the Bayesian Partitioning for Causal Discovery (BPC) algorithm.

      The method: - Applies the BPC algorithm to find initial clusters based on the provided dataset, statistical test, significance threshold, and equivalent sample size. - Canonicalizes the discovered clusters for consistency. - Refines the clusters using the defined single-cluster policy. - Converts the resulting clusters into a BlockSpec object for further use.

      Specified by:
      discover in interface BlockDiscoverer
      Returns:
      the discovered block specification, which encapsulates the refined and canonicalized cluster structure