本文整理了Java中Jama.Matrix.transpose()
方法的一些代码示例,展示了Matrix.transpose()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.transpose()
方法的具体详情如下:
包路径:Jama.Matrix
类名称:Matrix
方法名:transpose
暂无
代码示例来源:origin: marytts/marytts
public double[][] getDataProjected(Matrix data, boolean debug) {
// Project the original data set
Matrix dataProjected;
dataProjected = PC.transpose().times(data);
if (debug) {
System.out.println("Data projected:");
dataProjected.print(dataProjected.getRowDimension(), 3);
}
return dataProjected.getArray();
}
代码示例来源:origin: marytts/marytts
public double[][] getDataProjected(Matrix data, boolean debug) {
// Project the original data set
Matrix dataProjected;
dataProjected = PC.transpose().times(data);
if (debug) {
System.out.println("Data projected:");
dataProjected.print(dataProjected.getRowDimension(), 3);
}
return dataProjected.getArray();
}
代码示例来源:origin: h2oai/h2o-3
Matrix x_r = new Matrix(xxchol.getL()).transpose();
x_r = x_r.times(Math.sqrt(nobs));
Matrix rrmul = x_r.times(yt_r.transpose());
SingularValueDecomposition rrsvd = new SingularValueDecomposition(rrmul); // RS' = U \Sigma V'
double[] sval = rrsvd.getSingularValues(); // get singular values as double array
Matrix eigvec = yt_qr.getQ().times(rrsvd.getV());
代码示例来源:origin: marytts/marytts
Matrix Y = data.transpose();
Y = Y.times(1.0 / Math.sqrt(N - 1));
Matrix projectedData = PC.transpose().times(data);
Matrix covProjectedData = projectedData.times(projectedData.transpose());
代码示例来源:origin: marytts/marytts
Matrix Y = data.transpose();
Y = Y.times(1.0 / Math.sqrt(N - 1));
Matrix projectedData = PC.transpose().times(data);
Matrix covProjectedData = projectedData.times(projectedData.transpose());
代码示例来源:origin: marytts/marytts
covariance = data.times(data.transpose());
covariance = covariance.times(1.0 / (N - 1));
if (debug) {
System.out.println("Covariance");
Matrix projectedData = PC.transpose().times(data);
Matrix covProjectedData = projectedData.times(projectedData.transpose());
代码示例来源:origin: marytts/marytts
covariance = data.times(data.transpose());
covariance = covariance.times(1.0 / (N - 1));
if (debug) {
System.out.println("Covariance");
Matrix projectedData = PC.transpose().times(data);
Matrix covProjectedData = projectedData.times(projectedData.transpose());
代码示例来源:origin: openimaj/openimaj
static Matrix computeEssentialMatrix(CameraIntrinsics ci, Matrix F) {
return ci.calibrationMatrix.transpose().times(F).times(ci.calibrationMatrix);
}
代码示例来源:origin: org.openimaj/sandbox
static Matrix computeEssentialMatrix(CameraIntrinsics ci, Matrix F) {
return ci.calibrationMatrix.transpose().times(F).times(ci.calibrationMatrix);
}
代码示例来源:origin: percyliang/fig
public MultGaussianSuffStats(double[] x) {
sum = new Matrix(x, x.length);
outerproducts = sum.times(sum.transpose());
n = 1;
}
public MultGaussianSuffStats(MultGaussianSuffStats stats) {
代码示例来源:origin: bcdev/beam
/**
* @param pt point
* @return the square of the Mahalanobis distance of the point from center of gravity
*/
public double distancesqu(double[] pt) {
double[] df = new double[pt.length];
for (int k = 0; k < pt.length; k++){
df[k] = pt[k] - this.cog[k];
}
Matrix dfm = new Matrix(df, pt.length);
return Math.abs(dfm.transpose().times(this.covinv.times(dfm)).getArray()[0][0]);
}
代码示例来源:origin: us.ihmc/ihmc-robotics-toolkit
public static Matrix getCovarianceMatrix(Matrix m)
{
// TODO: Suggestion for javadoc comments:
// This method assumes sample sets in rows
int N = m.getColumnDimension();
Matrix ret = subtractAverageColumnFromEachRow(m);
ret = ret.times(ret.transpose());
ret = ret.times(1.0 / (N));
return ret;
}
代码示例来源:origin: openimaj/openimaj
@Override
public double[] predict(double[] data) {
final double[][] corrected = new double[][] { new double[data.length + 1] };
corrected[0][0] = 1;
System.arraycopy(data, 0, corrected[0], 1, data.length);
final Matrix x = new Matrix(corrected);
return x.times(this.weights).transpose().getArray()[0];
}
代码示例来源:origin: us.ihmc/IHMCRoboticsToolkit
public static Matrix getCovarianceMatrix(Matrix m)
{
// TODO: Suggestion for javadoc comments:
// This method assumes sample sets in rows
int N = m.getColumnDimension();
Matrix ret = subtractAverageColumnFromEachRow(m);
ret = ret.times(ret.transpose());
ret = ret.times(1.0 / (N));
return ret;
}
代码示例来源:origin: openimaj/openimaj
/**
* De-normalise a fundamental estimate. Use when {@link #estimate(List)} was
* called with pre-normalised data.
*
* @param norms
* the normalisation transforms
*/
public void denormaliseFundamental(Pair<Matrix> norms) {
this.fundamental = norms.secondObject().transpose().times(fundamental).times(norms.firstObject());
}
代码示例来源:origin: openimaj/openimaj
/**
* Compute the low rank estimate of the given vector
*
* @param in
* the vector
* @return the low-rank projection of the vector
*/
public double[] project(double[] in) {
return W.times(new Matrix(new double[][] { in }).transpose()).getColumnPackedCopy();
}
代码示例来源:origin: openimaj/openimaj
/**
* Compute the covariance matrix of the given samples (assumed each sample is a
* row).
*
* @param m
* the samples matrix
* @return the covariance matrix
*/
public static Matrix covariance(Matrix m) {
final int N = m.getRowDimension();
return times(m.transpose().times(m), 1.0 / (N > 1 ? N - 1 : N));
}
代码示例来源:origin: openimaj/openimaj
@Override
public double estimateLogProbability(double[] sample) {
final Matrix xm = new Matrix(1, N);
for (int i = 0; i < N; i++)
xm.set(0, i, sample[i] - mean.get(0, i));
final Matrix xmt = xm.transpose();
final double v = xm.times(inv_covar.times(xmt)).get(0, 0);
return Math.log(pdf_const_factor) + (-0.5 * v);
}
代码示例来源:origin: openimaj/openimaj
private IndependentPair<Matrix, Matrix> decorrelate(Matrix meanCentredX) {
final Matrix C = MatrixUtils.covariance(meanCentredX.transpose());
final Matrix CC = MatrixUtils.invSqrtSym(C);
return IndependentPair.pair(CC.times(meanCentredX), CC);
}
代码示例来源:origin: org.openimaj/sandbox
private IndependentPair<Matrix, Matrix> decorrelate(Matrix meanCentredX) {
final Matrix C = MatrixUtils.covariance(meanCentredX.transpose());
final Matrix CC = MatrixUtils.invSqrtSym(C);
return IndependentPair.pair(CC.times(meanCentredX), CC);
}
内容来源于网络,如有侵权,请联系作者删除!