Uses of Class
edu.cmu.tetrad.util.Matrix
Packages that use Matrix
Package
Description
Contains classes for searching for (mostly structural) causal models given data.
Contains classes for various sorts of scores for running score-based algorithms.
Contains classes for running conditional independence tests for various sorts of data.
Contains some utility classes for search algorithms.
Contains some classes that aren't ready for prime time.
- 
Uses of Matrix in edu.cmu.tetrad.algcomparison.algorithm.continuous.dagMethods 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.clusterMethods in edu.cmu.tetrad.cluster with parameters of type Matrix
- 
Uses of Matrix in edu.cmu.tetrad.dataMethods 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.regressionConstructors 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.searchMethods in edu.cmu.tetrad.search that return MatrixModifier and TypeMethodDescriptionstatic MatrixEstimates the W matrix using FastICA.static MatrixIcaLingD.estimateW(DataSet data, int fastIcaMaxIter, double fastIcaTolerance, double fastIcaA, boolean verbose) Estimates the W matrix using FastICA.Fits an ICA-LiNGAM model to the given dataset using a default method for estimating W.IcaLingam.getAcyclicTrimmedBHat(Matrix W) Calculates and returns the trimmed BHat matrix in an acyclic form using the given matrix W.FastIca.IcaResult.getK()Returns the pre-whitening matrix that projects data onto the first n.comp principal components.FactorAnalysis.getResidual()Returns the matrix of residuals.FastIca.IcaResult.getS()Returns the estimated source matrix.static MatrixIcaLingD.getScaledBHat(PermutationMatrixPair pair) Returns the BHat matrix, permuted to the variable order of the original data and scaled so that the diagonal consists only of 1's.FastIca.IcaResult.getW()Returns the estimated un-mixing matrix.FastIca.IcaResult.getX()Returns the pre-processed data matrix.static MatrixScales the given matrix M by diving each entry (i, j) by M(j, j)FactorAnalysis.successiveFactorVarimax(Matrix factorLoadingMatrix) Returns the matrix result for the varimax algorithm.FactorAnalysis.successiveResidual()Successive method with residual matrix.static MatrixThresholds the given matrix, sending any small entries in absolute value to zero.Methods in edu.cmu.tetrad.search that return types with arguments of type MatrixModifier and TypeMethodDescriptionFits a LiNG-D model to the given dataset using a default method for estimating W.IcaLingD.getScaledBHats(Matrix W) Performs the LiNG-D algorithm given a W matrix, which needs to be discovered elsewhere.Methods in edu.cmu.tetrad.search with parameters of type MatrixModifier and TypeMethodDescriptionstatic voidCenters each row of the given matrix by subtracting the mean of the row from each element.IcaLingam.getAcyclicTrimmedBHat(Matrix W) Calculates and returns the trimmed BHat matrix in an acyclic form using the given matrix W.IcaLingD.getScaledBHats(Matrix W) Performs the LiNG-D algorithm given a W matrix, which needs to be discovered elsewhere.booleanDetermines whether a BHat matrix parses to an acyclic graph.static booleanWhether the BHat matrix represents a stable model.static @NotNull GraphReturns a graph given a coefficient matrix and a list of variables.static PermutationMatrixPairIcaLingD.maximizeDiagonal(Matrix W) Finds a column permutation of the W matrix that maximizes the sum of 1 / |Wii| for diagonal elements Wii in W.static MatrixScales the given matrix M by diving each entry (i, j) by M(j, j)doubleCalculates the score for a given row in a matrix using the specified parameters.voidSets the initial un-mixing matrix of dimension (n.comp, n.comp).FactorAnalysis.successiveFactorVarimax(Matrix factorLoadingMatrix) Returns the matrix result for the varimax algorithm.static MatrixThresholds the given matrix, sending any small entries in absolute value to zero.Constructors in edu.cmu.tetrad.search with parameters of type MatrixModifierConstructorDescriptionConstructs an instance of the Fast ICA algorithm, taking as arguments the two arguments that cannot be defaulted: the data matrix itself and the number of components to be extracted.Constructs an instance of the IcaResult class, taking as arguments the four matrices that are the result of the Fast ICA algorithm.
- 
Uses of Matrix in edu.cmu.tetrad.search.scoreMethods 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.testMethods in edu.cmu.tetrad.search.test with parameters of type MatrixModifier and TypeMethodDescriptiondoubleIndTestHsic.empiricalHSIC(Matrix Ky, Matrix Kx, int m) Empirical unconditional Hilbert-Schmidt Dependence Measure for X and YdoubleIndTestHsic.empiricalHSICincompleteCholesky(Matrix Gy, Matrix Gx, int m) 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) 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 a new Fisher Z independence test with the listed arguments.IndTestHsic(Matrix data, List<Node> variables, double alpha) Constructs a new HSIC Independence test.
- 
Uses of Matrix in edu.cmu.tetrad.search.utilsMethods 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_progressMethods 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) 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.semMethods 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.utilMethods 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.scalarPlus(double scalar) Adds the specified scalar value to each element of the matrix and returns the resulting matrix.Matrix.scale(double scalar) scalarMult.static MatrixMatrix.serializableInstance()Generates a simple exemplar of this class to test serialization.Matrix.sqrt()sqrt.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.times.Constructors in edu.cmu.tetrad.util with parameters of type Matrix