Search in sources :

Example 51 with Matrix

use of dr.math.matrixAlgebra.Matrix in project beast-mcmc by beast-dev.

the class MultivariateNormalGibbsOperator method getPrecision.

private Matrix getPrecision() throws IllegalDimension {
    Matrix currentPrecision = new Matrix(likelihoodPrecision.getParameterAsMatrix());
    currentPrecision = currentPrecision.product(likelihood.getDataList().size());
    /*
for(int i=0; i<currentPrecision.columns(); i++){
for(int j=0; j<currentPrecision.rows(); j++){
System.err.print(currentPrecision.toComponents()[i][j]);
System.err.print(" ");}
System.err.print("\n"); }
*/
    return priorPrecision.add(currentPrecision);
}
Also used : Matrix(dr.math.matrixAlgebra.Matrix)

Aggregations

Matrix (dr.math.matrixAlgebra.Matrix)51 SymmetricMatrix (dr.math.matrixAlgebra.SymmetricMatrix)17 Vector (dr.math.matrixAlgebra.Vector)15 IllegalDimension (dr.math.matrixAlgebra.IllegalDimension)14 SymmetricMatrix.compoundCorrelationSymmetricMatrix (dr.math.matrixAlgebra.SymmetricMatrix.compoundCorrelationSymmetricMatrix)7 NodeRef (dr.evolution.tree.NodeRef)6 MultivariateNormalDistribution (dr.math.distributions.MultivariateNormalDistribution)5 WishartSufficientStatistics (dr.math.distributions.WishartSufficientStatistics)4 Parameter (dr.inference.model.Parameter)3 DoubleMatrix1D (cern.colt.matrix.DoubleMatrix1D)2 DoubleMatrix2D (cern.colt.matrix.DoubleMatrix2D)2 DenseDoubleMatrix2D (cern.colt.matrix.impl.DenseDoubleMatrix2D)2 Tree (dr.evolution.tree.Tree)2 MatrixParameter (dr.inference.model.MatrixParameter)2 RobustEigenDecomposition (dr.math.matrixAlgebra.RobustEigenDecomposition)2 WrappedMatrix (dr.math.matrixAlgebra.WrappedMatrix)2 BranchRates (dr.evolution.tree.BranchRates)1 MutableTreeModel (dr.evolution.tree.MutableTreeModel)1 CompoundSymmetricMatrix (dr.inference.model.CompoundSymmetricMatrix)1 CorrelationSymmetricMatrix (dr.inference.model.CorrelationSymmetricMatrix)1