Class DeterministicClusters.Fitter
java.lang.Object
edu.cmu.tetrad.data.audit.DeterministicClusters.Fitter
- Enclosing class:
DeterministicClusters
A reusable equation fitter for one dataset: the correlation matrix and its ridge-regularized inverse are
computed once, and each equation costs a few small solves. See the class Javadoc for the method.
- Version:
- $Id: $Id
- Author:
- josephramsey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionleaveOneOut(String varName) Fits the equation writing the named variable in terms of ALL other analyzed variables (screened to the ones that matter).onCommonSupport(List<String> targetNames, Collection<String> supportNames) Fits, for each target, its equation in terms of the SAME support universe -- the audit's retained-form report, where every removed variable is written in terms of the retained variables.
-
Constructor Details
-
Fitter
Constructs the fitter, computing means, standard deviations, and the correlation matrix once.- Parameters:
data- The dataset.threshold- The exactness threshold; seeDeterministicClusters.find(DataSet, double).
-
-
Method Details
-
leaveOneOut
Fits the equation writing the named variable in terms of ALL other analyzed variables (screened to the ones that matter).- Parameters:
varName- The variable for the left-hand side.- Returns:
- The fitted constraint; a constant variable comes back with empty support and residual fraction 0; null if the variable is not an analyzed or constant continuous variable of the dataset.
-
onCommonSupport
public List<DeterministicClusters.Constraint> onCommonSupport(List<String> targetNames, Collection<String> supportNames) Fits, for each target, its equation in terms of the SAME support universe -- the audit's retained-form report, where every removed variable is written in terms of the retained variables. One inverse of the support submatrix serves all targets.- Parameters:
targetNames- The variables for the left-hand sides.supportNames- The common support universe (the targets themselves are excluded automatically).- Returns:
- One constraint per target, in order; null entries for targets that are not analyzed continuous variables or when fewer than one support variable is analyzed.
-