use of com.jujutsu.tsne.barneshut.BHTSne in project clusterMaker2 by RBVI.
the class RuntSNE method run.
public void run() {
context.cancelled = false;
context.setXin(matrix.toArray());
TSne tsne;
// System.out.println("Is Symmetrical "+matrix.isSymmetrical());
if (context.useBarnesHut) {
monitor.setTitle("Running t-Distributed Stochastic Neighbor (tSNE) using Barnes-Hut approximation");
tsne = new BHTSne();
} else {
monitor.setTitle("Running t-Distributed Stochastic Neighbor (tSNE)");
tsne = new FastTSne();
}
double[][] result = tsne.tsne(context, monitor);
if (result == null && context.cancelled) {
monitor.setStatusMessage("Cancelled by user");
return;
}
Y = matrix.copy();
Y.initialize(result.length, result[0].length, result);
if (context.showScatterPlot) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
ScatterPlotDialog dialog = new ScatterPlotDialog(manager, "tSNE", monitor, Y);
}
});
}
}
Aggregations