Class TscTestBlockDiscoverer
- All Implemented Interfaces:
BlockDiscoverer
TscTestBlockDiscoverer class is an implementation of the BlockDiscoverer interface that utilizes
the Testing Strong Causal structures (TSC) algorithm to identify and discover clusters or blocks of variables from a
given dataset. These blocks represent groups of variables that exhibit strong causal relationships.
This class supports functionality to validate, canonicalize, and apply policies to discovered blocks, ensuring consistency and compliance with specified single cluster policies. It operates using parameters such as statistical significance level (alpha), expected sample size (ess), and a policy for handling overlapping clusters.
-
Constructor Summary
ConstructorsConstructorDescriptionTscTestBlockDiscoverer(DataSet dataSet, double alpha, int ess, double ridge, int rMax, SingletonClusterPolicy policy, int minRedundancy, boolean verbose) Constructs a TscTestBlockDiscoverer instance with the specified parameters for discovering and analyzing blocks of variables in a dataset using the TSC algorithm.TscTestBlockDiscoverer(DataSet dataSet, CovarianceMatrix pooledCovariance, double alpha, int ess, double ridge, int rMax, SingletonClusterPolicy policy, int minRedundancy, boolean verbose) Constructs a TscTestBlockDiscoverer over a pooled covariance matrix--for example, the averaged covariance of several imputations of a data set with missing values (seeBlocksUtil.pooledCovariance). -
Method Summary
-
Constructor Details
-
TscTestBlockDiscoverer
public TscTestBlockDiscoverer(DataSet dataSet, double alpha, int ess, double ridge, int rMax, SingletonClusterPolicy policy, int minRedundancy, boolean verbose) Constructs a TscTestBlockDiscoverer instance with the specified parameters for discovering and analyzing blocks of variables in a dataset using the TSC algorithm.- Parameters:
dataSet- The dataset to process for discovering variable relationships.alpha- A significance level parameter used for hypothesis testing, must be in the range (0, 1).ess- The equivalent sample size used in certain scoring or prior adjustments.ridge- A regularization parameter for ridge regression; must be greater than or equal to 0.rMax- The maximum number of iterations or search radius used in the discovery process.policy- The single cluster policy dictating the criteria for canonicalizing discovered clusters.minRedundancy- The minimum allowed redundancy level among variables in discovered clusters.verbose- A flag indicating whether to output detailed logging or debugging information during processing.- Throws:
IllegalArgumentException- If the ridge parameter is less than 0.
-
TscTestBlockDiscoverer
public TscTestBlockDiscoverer(DataSet dataSet, CovarianceMatrix pooledCovariance, double alpha, int ess, double ridge, int rMax, SingletonClusterPolicy policy, int minRedundancy, boolean verbose) Constructs a TscTestBlockDiscoverer over a pooled covariance matrix--for example, the averaged covariance of several imputations of a data set with missing values (seeBlocksUtil.pooledCovariance). The representative data set anchors the resultingBlockSpecand 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 TSC on, or null to compute it from the data set.alpha- A significance level parameter used for hypothesis testing, must be in the range (0, 1).ess- The equivalent sample size used in certain scoring or prior adjustments.ridge- A regularization parameter for ridge regression; must be greater than or equal to 0.rMax- The maximum number of iterations or search radius used in the discovery process.policy- The single cluster policy dictating the criteria for canonicalizing discovered clusters.minRedundancy- The minimum allowed redundancy level among variables in discovered clusters.verbose- A flag indicating whether to output detailed logging or debugging information during processing.- Throws:
IllegalArgumentException- If the ridge parameter is less than 0, or the pooled matrix's variables do not match the data set's.
-
-
Method Details
-
discover
Discovers and identifies blocks of variables using the TSC (Testing Strong Causal structures) algorithm.This method applies the following steps: - Validates the alpha parameter to ensure it is within the range (0, 1). - Constructs a TscScored instance to compute clusters of variables based on the given dataset. - Ensures discovered clusters (blocks) are valid, canonicalized, and consistent with the specified single cluster policy. - Converts the final block structure to the
BlockSpecformat for further processing or use.- Specified by:
discoverin interfaceBlockDiscoverer- Returns:
- The discovered
BlockSpecwhich represents clusters of variables based on the TSC algorithm. - Throws:
IllegalArgumentException- If the alpha parameter is not in the range (0, 1).
-