Search in sources :

Example 1 with FastTSne

use of com.jujutsu.tsne.FastTSne 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);
            }
        });
    }
}
Also used : TSne(com.jujutsu.tsne.TSne) BHTSne(com.jujutsu.tsne.barneshut.BHTSne) FastTSne(com.jujutsu.tsne.FastTSne) BHTSne(com.jujutsu.tsne.barneshut.BHTSne) FastTSne(com.jujutsu.tsne.FastTSne) ScatterPlotDialog(edu.ucsf.rbvi.clusterMaker2.internal.ui.ScatterPlotDialog)

Aggregations

FastTSne (com.jujutsu.tsne.FastTSne)1 TSne (com.jujutsu.tsne.TSne)1 BHTSne (com.jujutsu.tsne.barneshut.BHTSne)1 ScatterPlotDialog (edu.ucsf.rbvi.clusterMaker2.internal.ui.ScatterPlotDialog)1