Uses of Class
edu.cmu.tetrad.util.Matrix
Packages that use Matrix
Package
Description
This package contains classes for causal graph search algorithms.
This package contains classes for scoring causal graph models.
This package contains classes for testing causal graph search algorithms.
This package contains utility classes for causal graph search algorithms.
A package for algorithms that are not ready for prime time.
-
Uses of Matrix in edu.cmu.tetrad.algcomparison.algorithm.continuous.dag
Methods in edu.cmu.tetrad.algcomparison.algorithm.continuous.dag that return MatrixMethods in edu.cmu.tetrad.algcomparison.algorithm.continuous.dag that return types with arguments of type MatrixModifier and TypeMethodDescriptionIcaLingD.getStableBHats()Retrieves the list of stable B matrices generated by the algorithm.IcaLingD.getUnstableBHats()Retrieves the list of unstable B matrices generated by the algorithm. -
Uses of Matrix in edu.cmu.tetrad.cluster
Methods in edu.cmu.tetrad.cluster with parameters of type Matrix -
Uses of Matrix in edu.cmu.tetrad.data
Methods in edu.cmu.tetrad.data that return MatrixModifier and TypeMethodDescriptionstatic MatrixDataTransforms.centerData(Matrix data) centerData.static MatrixDataTransforms.concatenate(Matrix... dataSets) concatenate.static Matrixcov.static MatrixDataTransforms.getBootstrapSample(Matrix data, int sampleSize) getBootstrapSample.BoxDataSet.getCorrelationMatrix()getCorrelationMatrix.DataSet.getCorrelationMatrix()If this is a continuous data set, returns the correlation matrix.NumberObjectDataSet.getCorrelationMatrix()getCorrelationMatrix.BoxDataSet.getCovarianceMatrix()getCovarianceMatrix.DataSet.getCovarianceMatrix()If this is a continuous data set, returns the covariance matrix.NumberObjectDataSet.getCovarianceMatrix()getCovarianceMatrix.TimeSeriesData.getData()getData.BoxDataSet.getDoubleData()getDoubleData.DataSet.getDoubleData()getDoubleData.NumberObjectDataSet.getDoubleData()getDoubleData.final MatrixCorrelationMatrixOnTheFly.getMatrix()getMatrix.final MatrixCovarianceMatrix.getMatrix()getMatrix.final MatrixCovarianceMatrixOnTheFly.getMatrix()Getter for the fieldmatrix.final MatrixCovarianceMatrixOnTheFly.getMatrix(int[] rows) Getter for the fieldmatrix.ICovarianceMatrix.getMatrix()Retrieves the covariance matrix.CorrelationMatrix.getSelection(int[] rows, int[] cols) Returns a submatrix based on the specified rows and columns.CorrelationMatrixOnTheFly.getSelection(int[] rows, int[] cols) Returns a submatrix based on the specified rows and columns.CovarianceMatrix.getSelection(int[] rows, int[] cols) Returns a submatrix based on the specified rows and columns.CovarianceMatrixOnTheFly.getSelection(int[] rows, int[] cols) Returns a submatrix based on the specified rows and columns.CovarianceMatrixOnTheFly.getSelection(int[] rows, int[] cols, int[] dataRows) getSelection.ICovarianceMatrix.getSelection(int[] rows, int[] cols) Returns a submatrix based on the specified rows and columns.static MatrixDataTransforms.standardizeData(Matrix data) standardizeData.static MatrixDataTransforms.standardizeData(Matrix data, List<Node> variables) Standardizes the columns of the given data matrix by centering and scaling.static MatrixsubMatrix.static MatrixsubMatrix.static MatrixsubMatrix.static MatrixsubMatrix.Methods in edu.cmu.tetrad.data with parameters of type MatrixModifier and TypeMethodDescriptionstatic MatrixDataTransforms.centerData(Matrix data) centerData.static MatrixDataTransforms.concatenate(Matrix... dataSets) concatenate.static booleanDataUtils.containsMissingValue(Matrix data) containsMissingValue.static Matrixcov.static MatrixDataTransforms.getBootstrapSample(Matrix data, int sampleSize) getBootstrapSample.static Vectormean.static Vectormeans.voidSets the covariance matrix.voidSets the covariance matrix.voidSets the covariance matrix.voidSets the covariance matrix.voidSets the covariance matrix.static MatrixDataTransforms.standardizeData(Matrix data) standardizeData.static MatrixDataTransforms.standardizeData(Matrix data, List<Node> variables) Standardizes the columns of the given data matrix by centering and scaling.static MatrixsubMatrix.static MatrixsubMatrix.Constructors in edu.cmu.tetrad.data with parameters of type MatrixModifierConstructorDescriptionCorrelationMatrix(List<Node> variables, Matrix matrix, int sampleSize) Constructs a correlation matrix data set using the given information.CovarianceMatrix(List<Node> variables, Matrix matrix, int sampleSize) Protected constructor to construct a new covariance matrix using the supplied continuous variables and the the given symmetric, positive definite matrix and sample size.TimeSeriesData(Matrix matrix, List<String> varNames) Constructs a new time series data contains for the given row-major data array and the given list of variables. -
Uses of Matrix in edu.cmu.tetrad.regression
Constructors in edu.cmu.tetrad.regression with parameters of type MatrixModifierConstructorDescriptionRegressionDataset(Matrix data, List<Node> variables) Constructor for RegressionDataset. -
Uses of Matrix in edu.cmu.tetrad.search
Methods in edu.cmu.tetrad.search that return MatrixModifier and TypeMethodDescriptionstatic MatrixEstimates the weight matrix W using the Fast Independent Component Analysis (FastICA) algorithm.static MatrixIcaLingD.estimateW(DataSet data, int fastIcaMaxIter, double fastIcaTolerance, double fastIcaA, boolean verbose) Estimates the weight matrix (W) using the Fast Independent Component Analysis (FastICA) algorithm.Fits a dataset to estimate a weight matrix using the ICA-LiNGAM algorithm.IcaLingam.getAcyclicTrimmedBHat(Matrix W) Processes a given matrix W to generate a scaled and trimmed matrix B̂ that is guaranteed to correspond to an acyclic directed graph (DAG).FactorAnalysis.getResidual()Returns the matrix of residuals.static MatrixIcaLingD.getScaledBHat(PermutationMatrixPair pair) Build B̂ from a permutation result; robust to tiny diagonals.FastIca.IcaResult.K()Returns the value of theKrecord component.FastIca.IcaResult.S()Returns the value of theSrecord component.static MatrixScale columns by their diagonal (guarding tiny/zero).FactorAnalysis.successiveFactorVarimax(Matrix factorLoadingMatrix) Returns the matrix result for the varimax algorithm.FactorAnalysis.successiveResidual()Successive method with residual matrix.static MatrixHard threshold (copy).FastIca.IcaResult.W()Returns the value of theWrecord component.FastIca.IcaResult.X()Returns the value of theXrecord component.Methods in edu.cmu.tetrad.search that return types with arguments of type MatrixModifier and TypeMethodDescriptionConvenience: estimate W via FastICA, then enumerate B̂ candidates.IcaLingD.getScaledBHats(Matrix W) Local LiNG-D from a given W: 1) Threshold W (small entries -> 0).Methods in edu.cmu.tetrad.search with parameters of type MatrixModifier and TypeMethodDescriptionstatic voidCenters the rows of the given matrix by subtracting the mean of each row from its elements.IcaLingam.getAcyclicTrimmedBHat(Matrix W) Processes a given matrix W to generate a scaled and trimmed matrix B̂ that is guaranteed to correspond to an acyclic directed graph (DAG).IcaLingD.getScaledBHats(Matrix W) Local LiNG-D from a given W: 1) Threshold W (small entries -> 0).booleanChecks whether the graph induced by the scaled coefficient matrix represents an acyclic directed graph (DAG).static booleanSpectral-radius stability with small tolerance.static @NotNull GraphConstructs a directed graph based on the input binary adjacency matrix and a list of nodes.static PermutationMatrixPairIcaLingD.maximizeDiagonal(Matrix W) Computes a permutation matrix pair that maximizes the diagonal elements of a given matrix W.static MatrixScale columns by their diagonal (guarding tiny/zero).doubleCalculates the score for a given row in a matrix using the specified parameters.voidSets the initial weights matrix to be used for the FastICA algorithm.FactorAnalysis.successiveFactorVarimax(Matrix factorLoadingMatrix) Returns the matrix result for the varimax algorithm.static MatrixHard threshold (copy).Constructors in edu.cmu.tetrad.search with parameters of type Matrix -
Uses of Matrix in edu.cmu.tetrad.search.score
Methods in edu.cmu.tetrad.search.score that return MatrixModifier and TypeMethodDescriptionSemBicScore.CovAndCoefs.b()Returns the value of thebrecord component.SemBicScore.CovAndCoefs.cov()Returns the value of thecovrecord component.static MatrixComputes the covariance matrix for the given subset of rows and columns in the provided data set.Methods in edu.cmu.tetrad.search.score with parameters of type MatrixModifier and TypeMethodDescriptionstatic MatrixComputes the covariance matrix for the given subset of rows and columns in the provided data set.static SemBicScore.CovAndCoefsSemBicScore.getCovAndCoefs(int i, int[] parents, Matrix data, ICovarianceMatrix covariances, boolean calculateRowSubsets, double lambda) Returns the covariance matrix of the regression of the ith variable on its parents and the regression coefficients.static @NotNull SemBicScore.CovAndCoefsSemBicScore.getCovAndCoefs(int i, int[] parents, Matrix data, ICovarianceMatrix covariances, double lambda, List<Integer> rows) Returns the covariance matrix of the regression of the ith variable on its parents and the regressionstatic doubleSemBicScore.getResidualVariance(int i, int[] parents, Matrix data, ICovarianceMatrix covariances, boolean calculateRowSubsets, double lambda) Returns the variance of the residual of the regression of the ith variable on its parents.Constructors in edu.cmu.tetrad.search.score with parameters of type MatrixModifierConstructorDescriptionCovAndCoefs(Matrix cov, Matrix b) Creates an instance of aCovAndCoefsrecord class. -
Uses of Matrix in edu.cmu.tetrad.search.test
Methods in edu.cmu.tetrad.search.test with parameters of type MatrixModifier and TypeMethodDescriptiondoubleIndTestHsic.empiricalHSIC(Matrix Ky, Matrix Kx, int m) Deprecated.Empirical unconditional Hilbert-Schmidt Dependence Measure for X and YdoubleIndTestHsic.empiricalHSICincompleteCholesky(Matrix Gy, Matrix Gx, int m) Deprecated.Empirical unconditional Hilbert-Schmidt Dependence Measure for X and Y using incomplete Cholesky decomposition to approximate Gram matricesdoubleIndTestHsic.empiricalHSICincompleteCholesky(Matrix Gy, Matrix Gx, Matrix Gz, int m) Deprecated.Empirical unconditional Hilbert-Schmidt Dependence Measure for X and Y given Z using incomplete Cholesky decomposition to approximate Gram matricesConstructors in edu.cmu.tetrad.search.test with parameters of type MatrixModifierConstructorDescriptionIndTestFisherZ(Matrix data, List<Node> variables, double alpha) Constructs an instance of the IndTestFisherZ class, which is a statistical test for conditional independence based on the Fisher Z-test.IndTestFisherZ(Matrix data, List<Node> variables, double alpha, double ridge) Constructor for the IndTestFisherZ class, which performs a Fisher Z independence test with ridge regularization applied to handle issues with covariance matrix inversion.IndTestHsic(Matrix data, List<Node> variables, double alpha) Deprecated.Constructs a new HSIC Independence test. -
Uses of Matrix in edu.cmu.tetrad.search.utils
Methods in edu.cmu.tetrad.search.utils that return MatrixModifier and TypeMethodDescriptionstatic MatrixConstructs the centralized Gram matrix for a given vector valued sample.static MatrixConstructs Gram matrix for a given vector valued sample.static MatrixKernelUtils.constructH(int m) Constructs the projection matrix on 1/mPermutationMatrixPair.getPermutedMatrix()Returns W, permuted rowwise by the permutation passed in through the constructor.static MatrixKernelUtils.incompleteCholeskyGramMatrix(List<Kernel> kernels, DataSet dataset, List<Node> nodes, double precision) Approximates Gram matrix using incomplete Cholesky factorizationMethods in edu.cmu.tetrad.search.utils with parameters of type MatrixModifier and TypeMethodDescriptionstatic booleanTsUtils.allEigenvaluesAreSmallerThanOneInModulus(Matrix mat) allEigenvaluesAreSmallerThanOneInModulus.Constructors in edu.cmu.tetrad.search.utils with parameters of type MatrixModifierConstructorDescriptionPartialCorrelation(List<Node> nodes, Matrix cov, int sampleSize) Constructor.PermutationMatrixPair(Matrix M, int[] rowPerm, int[] colPerm) Constructs with a given matrix M and a row and column permutation (which may be null). -
Uses of Matrix in edu.cmu.tetrad.search.work_in_progress
Methods in edu.cmu.tetrad.search.work_in_progress that return MatrixModifier and TypeMethodDescriptionGlasso.getSs()Getter for the fieldss.Matrix[]MixtureModel.getVariances()getVariances.Glasso.Result.getWwi()Getter for the fieldwwi.Constructors in edu.cmu.tetrad.search.work_in_progress with parameters of type MatrixModifierConstructorDescriptionConstructor for Glasso.IndTestFisherZRecursive(Matrix data, List<Node> variables, double alpha) Deprecated.Constructs a new Fisher Z independence test with the listed arguments.MixtureModel(DataSet data, double[][] dataArray, double[][] meansArray, double[] weightsArray, Matrix[] variancesArray, double[][] gammaArray) Constructs a mixture model from a mixed data set, a means matrix, a weights array, a variance matrix, and a gamma matrix.Constructor for Result. -
Uses of Matrix in edu.cmu.tetrad.sem
Methods in edu.cmu.tetrad.sem that return MatrixModifier and TypeMethodDescriptionSemEstimatorGibbs.getDataSet()Getter for the fielddataSet.DagScorer.getEdgeCoef()Getter for the fieldedgeCoef.Scorer.getEdgeCoef()getEdgeCoef.SemIm.getEdgeCoef()Getter for the fieldedgeCoef.SemIm.getErrCovar()Getter for the fielderrCovar.DagScorer.getErrorCovar()Getter for the fielderrorCovar.Scorer.getErrorCovar()getErrorCovar.ISemIm.getImplCovar(boolean recalculate) getImplCovar.SemIm.getImplCovar(boolean recalculate) getImplCovar.SemIm.getImplCovar(List<Node> nodes) Getter for the fieldimplCovar.StandardizedSemIm.getImplCovar()Getter for the fieldimplCovar.ISemIm.getImplCovarMeas()getImplCovarMeas.SemIm.getImplCovarMeas()getImplCovarMeas.StandardizedSemIm.getImplCovarMeas()Getter for the fieldimplCovarMeas.DagScorer.getSampleCovar()Getter for the fieldsampleCovar.Scorer.getSampleCovar()getSampleCovar.SemIm.getSampleCovar()getSampleCovar.Methods in edu.cmu.tetrad.sem with parameters of type MatrixModifier and TypeMethodDescriptiondoublegetStdDev.doublegetStdDev.doubleISemIm.getVariance(Node nodeA, Matrix implCovar) getVariance.doubleSemIm.getVariance(Node node, Matrix implCovar) Returns the variance for a given node.updatedIm.Constructors in edu.cmu.tetrad.sem with parameters of type Matrix -
Uses of Matrix in edu.cmu.tetrad.util
Methods in edu.cmu.tetrad.util that return MatrixModifier and TypeMethodDescriptionstatic Matrixcholesky.Matrix.chooseInverse(double lambda) Calculates and returns the appropriate inverse of the matrix based on the provided lambda value: If lambda is 0.0, the inverse of the matrix is computed using the standard inversion method. If lambda is greater than 0.0, the matrix is regularized by adding lambda to the diagonal, ensuring numerical stability for near-singular matrices, and then the inverse is computed. If lambda is less than 0.0, the Moore-Penrose pseudoinverse is computed, which is useful for non-square or singular matrices. This method is designed to handle a variety of inverse computations depending on the requirements, such as regularization or handling singular matrices.static MatrixMatrixUtils.convertCovToCorr(Matrix m) Converts a covariance matrix to a correlation matrix in place; the same matrix is returned for convenience, but m is modified in the process.Matrix.copy()copy.Vector.diag()diag.static MatrixGenerates a diagonal matrix using the elements of the given vector.Matrix.getPart(int i, int j, int k, int l) Extracts a submatrix from the current matrix based on the specified row and column ranges.static MatrixMatrix.identity(int rows) identity.static MatrixMatrixUtils.impliedCovar(Matrix edgeCoef, Matrix errCovar) Calculates the implied covariance matrix from the given edge coefficient matrix and error covariance matrix.Matrix.inverse()Returns the inverse of the matrix.Matrix.like()like.MView.mat()Creates and returns a new Matrix instance representing a submatrix based on the rows and columns specified in the MatrixView.minus.plus.Matrix.pseudoinverse()Returns the Moore-Penrose pseudoinverse of the matrix.Matrix.regularize(double lambda) Regularizes the diagonal of the matrix by adding a scaled identity matrix to it.Matrix.scalarMult(double scalar) scalarMult.Matrix.scalarPlus(double scalar) Adds the specified scalar value to each element of the matrix and returns the resulting matrix.static MatrixMatrix.serializableInstance()Generates a simple exemplar of this class to test serialization.Solves the linear system A * X = B where this matrix is A and the argument is B.Matrix.sqrt()sqrt.static MatrixMatrixUtils.symmetrize(Matrix sigma) Computes the symmetrized version of the given square matrix.times.Matrix.transpose()transpose.Methods in edu.cmu.tetrad.util with parameters of type MatrixModifier and TypeMethodDescriptionvoidassign.voidMatrix.assignPart(int[] range1, int[] range2, Matrix from) Assigns a part of the given matrix to a specified submatrix while adding the values to the existing data.static Matrixcholesky.static MatrixMatrixUtils.convertCovToCorr(Matrix m) Converts a covariance matrix to a correlation matrix in place; the same matrix is returned for convenience, but m is modified in the process.booleanequals.static MatrixMatrixUtils.impliedCovar(Matrix edgeCoef, Matrix errCovar) Calculates the implied covariance matrix from the given edge coefficient matrix and error covariance matrix.static booleanMatrixUtils.isPositiveDefinite(Matrix matrix) Return true if the given matrix is symmetric positive definite--that is, if it would make a valid covariance matrix.minus.static doubleStatUtils.partialCorrelation(Matrix submatrix, double lambda) Assumes that the given covariance matrix was extracted in such a way that the order of the variables (in either direction) is X, Y, Z1, ..., Zn, where the partial correlation one wants is correlation(X, Y | Z1,...,Zn).static doubleStatUtils.partialCorrelation(Matrix covariance, double lambda, int x, int y, int... z) partialCorrelation.static doubleStatUtils.partialCorrelationPrecisionMatrix(Matrix submatrix, double lambda) partialCorrelationPrecisionMatrix.static doubleStatUtils.partialCovarianceWhittaker(Matrix submatrix) Assumes that the given covariance matrix was extracted in such a way that the order of the variables (in either direction) is X, Y, Z1, ..., Zn, where the partial covariance one wants is covariance(X, Y | Z1,...,Zn).static doubleStatUtils.partialCovarianceWhittaker(Matrix covariance, int x, int y, int... z) partialCovarianceWhittaker.static doubleStatUtils.partialStandardDeviation(Matrix covariance, int x, int... z) partialStandardDeviation.static doubleStatUtils.partialVariance(Matrix covariance, int x, int... z) partialVariance.plus.static Vectorproduct.voidSets the values of the current matrix view to match the provided matrix.Solves the linear system A * X = B where this matrix is A and the argument is B.static MatrixMatrixUtils.symmetrize(Matrix sigma) Computes the symmetrized version of the given square matrix.times.Constructors in edu.cmu.tetrad.util with parameters of type Matrix