float z = (float) component(i, mm) * factor;
out[i] = new Point(x, y, z);
}
- //&!
- System.out.println("Points:");
- for (Point point : out)
- {
- System.out.println(point.toString());
- }
return out;
}
PrintStream ps = wrapOutputBuffer(sb);
/*
- * pairwise similarity scores
- */
- sb.append(" --- OrigT * Orig ---- \n");
- pairwiseScores.print(ps, "%8.2f");
-
- /*
- * eigenvalues matrix, with D vector
+ * coordinates matrix, with D vector
*/
- sb.append(" --- New diagonalization matrix ---\n");
- eigenMatrix.print(ps, "%8.2f");
+ sb.append(" --- Coordinates ---\n");
+ eigenMatrix.print(ps, "%8.6f ");
sb.append(" --- Eigenvalues ---\n");
eigenMatrix.printD(ps, "%15.4e");
ps.println();
ccAnalysis cc = new ccAnalysis(pairwiseScores, dim);
pairwiseScores = cc.run();
- /** perform the eigendecomposition for the plot */
eigenMatrix = pairwiseScores.copy();
eigenMatrix.setD(pairwiseScores.getD());
- System.out.println(getDetails());
} catch (Exception q)
System.out.println();
System.out.println("uncorrected eigenvalues");
eigenMatrix.printD(System.out, "%2.4f ");
+ System.out.println();
double[] eigenVals = eigenMatrix.getD();
q.printStackTrace();
}
System.out.println("final coordinates:");
- repMatrix.print(System.out, "%8.2f");
+ repMatrix.print(System.out, "%1.8f ");
return repMatrix;
}
double alpha = 0.0; // "Levenberg-Marquardt" parameter
double gNorm = 0;
- byte terminationStatus = 0;
+ boolean terminationStatus = false;
int iteration = 0;
while (true)
{
gNorm = MiscMath.norm(g);
- if (terminationStatus != 0 || nfev == maxNfev)
+ if (terminationStatus || nfev == maxNfev)
{
break;
}
// default ftol and xtol = 1e-8
boolean ftolSatisfied = actualReduction < (1e-8 * cost) && ratio > 0.25;
- boolean xtolSatisfied = stepHnorm < (1e-8 * (1e-8 + xNorm));
- terminationStatus = (ftolSatisfied || xtolSatisfied) ? (byte) 1 : (byte) 0;
- if (terminationStatus != 0)
+ boolean xtolSatisfied = stepHnorm < (1e-8 * (1e-8 + MiscMath.norm(hA)));
+ terminationStatus = ftolSatisfied || xtolSatisfied;
+ if (terminationStatus)
{
break;
}