Package edu.cmu.tetrad.util
Class EssLikePython
java.lang.Object
edu.cmu.tetrad.util.EssLikePython
The EssLikePython class provides methods for estimating the Effective Sample Size (ESS) of a dataset using procedures
that closely mimic functionality found my Python script. This includes column standardization, row sampling, and
computation of correlations to derive the ESS value.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classEncapsulates the results of an estimation process, including average row correlation, effective sample size (ESS), and the number of rows used in the computation. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic EssLikePython.ResultestimateLikePython(org.ejml.simple.SimpleMatrix X, int sampleSize, boolean clampNonnegative, Random rng) Estimates the effective sample size (ESS) and average row correlation (avgRowCorr) from a given dataset, by column-standardizing, sampling rows, and computing row-wise correlations.
-
Constructor Details
-
EssLikePython
public EssLikePython()Default constructor for the EssLikePython class. Initializes a new instance of the EssLikePython class.
-
-
Method Details
-
estimateLikePython
public static EssLikePython.Result estimateLikePython(org.ejml.simple.SimpleMatrix X, int sampleSize, boolean clampNonnegative, Random rng) Estimates the effective sample size (ESS) and average row correlation (avgRowCorr) from a given dataset, by column-standardizing, sampling rows, and computing row-wise correlations. Optionally clamps the correlation to ensure non-negativity.- Parameters:
X- the input data matrix where rows represent observations and columns represent variablessampleSize- the number of rows to sample without replacement during the estimation processclampNonnegative- a flag indicating whether to clamp avgRowCorr to nonnegative valuesrng- a Random object to control the random sampling of rows (if null, a default seed is used)- Returns:
- a Result object containing the estimated avgRowCorr, computed ESS, and the number of rows used
-