本文整理了Java中Jama.Matrix.getColumnPackedCopy()
方法的一些代码示例,展示了Matrix.getColumnPackedCopy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matrix.getColumnPackedCopy()
方法的具体详情如下:
包路径:Jama.Matrix
类名称:Matrix
方法名:getColumnPackedCopy
暂无
代码示例来源:origin: marytts/marytts
residuals = r.getColumnPackedCopy();
predictedValues = p.getColumnPackedCopy();
correlation = MathUtils.correlation(predictedValues, y.getColumnPackedCopy());
代码示例来源:origin: marytts/marytts
residuals = r.getColumnPackedCopy();
predictedValues = p.getColumnPackedCopy();
correlation = MathUtils.correlation(predictedValues, y.getColumnPackedCopy());
代码示例来源:origin: marytts/marytts
residuals = r.getColumnPackedCopy();
predictedValues = p.getColumnPackedCopy();
for (int i = 0; i < predictedValues.length; i++)
if (predictedValues[i] < 0.0)
correlation = MathUtils.correlation(predictedValues, indVar.getColumnPackedCopy());
代码示例来源:origin: marytts/marytts
residuals = r.getColumnPackedCopy();
predictedValues = p.getColumnPackedCopy();
for (int i = 0; i < predictedValues.length; i++)
if (predictedValues[i] < 0.0)
correlation = MathUtils.correlation(predictedValues, indVar.getColumnPackedCopy());
代码示例来源:origin: h2oai/h2o-3
xrow = tmp.getColumnPackedCopy();
代码示例来源: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
private double[] project(double[] vector) {
final Matrix vec = new Matrix(1, vector.length);
final double[][] vecarr = vec.getArray();
for (int i = 0; i < vector.length; i++)
vecarr[0][i] = vector[i] - mean[i];
return vec.times(basis).getColumnPackedCopy();
}
代码示例来源:origin: senbox-org/s1tbx
private static double[] computePolynomialCoefficients(
double slantRangeToFirstPixel, double slantRangeToMidPixel, double slantRangeToLastPixel, int imageWidth) {
final int firstPixel = 0;
final int midPixel = imageWidth / 2;
final int lastPixel = imageWidth - 1;
final double[] idxArray = {firstPixel, midPixel, lastPixel};
final double[] rangeArray = {slantRangeToFirstPixel, slantRangeToMidPixel, slantRangeToLastPixel};
final Matrix A = Maths.createVandermondeMatrix(idxArray, 2);
final Matrix b = new Matrix(rangeArray, 3);
final Matrix x = A.solve(b);
return x.getColumnPackedCopy();
}
代码示例来源:origin: senbox-org/s1tbx
private static double[] computePolynomialCoefficients(
double slantRangeToFirstPixel, double slantRangeToMidPixel, double slantRangeToLastPixel, int imageWidth) {
final int firstPixel = 0;
final int midPixel = imageWidth / 2;
final int lastPixel = imageWidth - 1;
final double[] idxArray = {firstPixel, midPixel, lastPixel};
final double[] rangeArray = {slantRangeToFirstPixel, slantRangeToMidPixel, slantRangeToLastPixel};
final Matrix A = Maths.createVandermondeMatrix(idxArray, 2);
final Matrix b = new Matrix(rangeArray, 3);
final Matrix x = A.solve(b);
return x.getColumnPackedCopy();
}
代码示例来源:origin: senbox-org/s1tbx
private static double[] computePolynomialCoefficients(
double slantRangeToFirstPixel, double slantRangeToMidPixel, double slantRangeToLastPixel, int imageWidth) {
final int firstPixel = 0;
final int midPixel = imageWidth / 2;
final int lastPixel = imageWidth - 1;
final double[] idxArray = {firstPixel, midPixel, lastPixel};
final double[] rangeArray = {slantRangeToFirstPixel, slantRangeToMidPixel, slantRangeToLastPixel};
final Matrix A = Maths.createVandermondeMatrix(idxArray, 2);
final Matrix b = new Matrix(rangeArray, 3);
final Matrix x = A.solve(b);
return x.getColumnPackedCopy();
}
代码示例来源:origin: org.openimaj/image-feature-extraction
private double[] project(double[] vector) {
final Matrix vec = new Matrix(1, vector.length);
final double[][] vecarr = vec.getArray();
for (int i = 0; i < vector.length; i++)
vecarr[0][i] = vector[i] - mean[i];
return vec.times(basis).getColumnPackedCopy();
}
代码示例来源:origin: openimaj/openimaj
@Override
public double[] whiten(double[] vector) {
final double[] normVec = ns.normalise(vector);
final Matrix vec = new Matrix(new double[][] { normVec });
return vec.times(transform).getColumnPackedCopy();
}
代码示例来源:origin: senbox-org/s1tbx
private static double[] computePolynomialCoefficients(
double slantRangeToFirstPixel, double slantRangeToMidPixel, double slantRangeToLastPixel, int imageWidth) {
final int firstPixel = 0;
final int midPixel = imageWidth / 2;
final int lastPixel = imageWidth - 1;
final double[] idxArray = {firstPixel, midPixel, lastPixel};
final double[] rangeArray = {slantRangeToFirstPixel, slantRangeToMidPixel, slantRangeToLastPixel};
final Matrix A = Maths.createVandermondeMatrix(idxArray, 2);
final Matrix b = new Matrix(rangeArray, 3);
final Matrix x = A.solve(b);
return x.getColumnPackedCopy();
}
代码示例来源:origin: openimaj/openimaj
/**
* Project a vector by the basis. The vector is normalised by subtracting
* the mean and then multiplied by the basis.
*
* @param vector
* the vector to project
* @return projected vector
*/
public double[] project(double[] vector) {
final Matrix vec = new Matrix(1, vector.length);
final double[][] vecarr = vec.getArray();
for (int i = 0; i < vector.length; i++)
vecarr[0][i] = vector[i] - mean[i];
return vec.times(basis).getColumnPackedCopy();
}
代码示例来源:origin: openimaj/openimaj
/**
* Project a vector by the basis. The vector
* is normalised by subtracting the mean and
* then multiplied by the basis.
* @param vector the vector to project
* @return projected vector
*/
public double[] project(double [] vector) {
Matrix vec = new Matrix(1, vector.length);
final double[][] vecarr = vec.getArray();
for (int i=0; i<vector.length; i++)
vecarr[0][i] = vector[i] - mean[i];
return vec.times(eigenvectors).getColumnPackedCopy();
}
}
代码示例来源:origin: sc.fiji/TrackMate_
/**
* Runs the prediction step of the Kalman filter and returns the state
* predicted by the evolution process.
*
* @return a new <code>double[]</code> of 6 elements containing the
* predicted state: <code>x, y, z, vx, vy, vz</code> with velocity
* in <code>length/frame</code> units.
*
*/
public double[] predict()
{
Xp = A.times( X );
P = A.times( P.times( A.transpose() ) ).plus( Q );
return Xp.getColumnPackedCopy();
}
代码示例来源:origin: openimaj/openimaj
/**
* Generate a new "observation" as a linear combination of
* the eigenvectors (ev): mean + ev * scaling.
* <p>
* If the scaling vector is shorter than the number of
* components, it will be zero-padded. If it is longer,
* it will be truncated.
*
* @param scalings the weighting for each eigenvector
* @return generated observation
*/
public double [] generate(double[] scalings) {
Matrix scale = new Matrix(this.eigenvalues.length, 1);
for (int i=0; i<Math.min(eigenvalues.length, scalings.length); i++)
scale.set(i, 0, scalings[i]);
Matrix meanMatrix = new Matrix(new double[][]{mean}).transpose();
return meanMatrix.plus(eigenvectors.times(scale)).getColumnPackedCopy();
}
代码示例来源:origin: openimaj/openimaj
/**
* Generate a new "observation" as a linear combination of the principal
* components (PC): mean + PC * scaling.
*
* If the scaling vector is shorter than the number of components, it will
* be zero-padded. If it is longer, it will be truncated.
*
* @param scalings
* the weighting for each PC
* @return generated observation
*/
public double[] generate(double[] scalings) {
final Matrix scale = new Matrix(this.eigenvalues.length, 1);
for (int i = 0; i < Math.min(eigenvalues.length, scalings.length); i++)
scale.set(i, 0, scalings[i]);
final Matrix meanMatrix = new Matrix(new double[][] { mean }).transpose();
return meanMatrix.plus(basis.times(scale)).getColumnPackedCopy();
}
代码示例来源:origin: fiji/TrackMate
/**
* Runs the prediction step of the Kalman filter and returns the state
* predicted by the evolution process.
*
* @return a new <code>double[]</code> of 6 elements containing the
* predicted state: <code>x, y, z, vx, vy, vz</code> with velocity
* in <code>length/frame</code> units.
*
*/
public double[] predict()
{
Xp = A.times( X );
P = A.times( P.times( A.transpose() ) ).plus( Q );
return Xp.getColumnPackedCopy();
}
代码示例来源:origin: percyliang/fig
public double [] sample(Random random)
{
Matrix L = getChol().getL();
// start with a vector of iid std normals
Matrix stdNormal = new Matrix(dim(), 1);
for (int i = 0; i < dim(); i++)
{
stdNormal.set(i, 0, SampleUtils.sampleGaussian(random));
}
Matrix result = L.times(stdNormal);
result.plusEquals(mean);
return result.getColumnPackedCopy();
}
public double[] sampleObject(Random random) { return sample(random); }
内容来源于网络,如有侵权,请联系作者删除!