Class AlgorithmSpectralClustering

  • All Implemented Interfaces:
    java.awt.event.ActionListener, java.awt.event.WindowListener, java.lang.Runnable, java.util.EventListener

    public class AlgorithmSpectralClustering
    extends AlgorithmBase
    Author:
    William Gandler This program is an implementation of the algorithm described in "On Spectral Clustering: Analysis and an algorithm" by Andrew Y. Ng, Michael I. Jordan, and Yair Weiss. This forms clusters of nonconvex objects in black and white images or in text data files.
    • Field Detail

      • scale

        private double[] scale
      • pos

        private double[][] pos
      • groupNum

        private int[] groupNum
      • centroidPos

        private double[][] centroidPos
      • resultsFileName

        private java.lang.String resultsFileName
      • redBuffer

        private float[] redBuffer
      • greenBuffer

        private float[] greenBuffer
      • blueBuffer

        private float[] blueBuffer
      • scaleMax

        private double scaleMax
      • useColorHistogram

        private boolean useColorHistogram
      • scaleVariablesToUnitVariance

        private boolean scaleVariablesToUnitVariance
      • nDims

        private int nDims
      • nPoints

        private int nPoints
      • numberClusters

        private int numberClusters
      • A

        private double[][] A
      • scale2

        private double[] scale2
      • D

        private double[][] D
      • L

        private double[][] L
      • jobz

        private char jobz
      • range

        private char range
      • uplo

        private char uplo
      • il

        private int il
      • iu

        private int iu
      • abstol

        private double abstol
      • numEigenvaluesFound

        private int[] numEigenvaluesFound
      • eigenvalues

        private double[] eigenvalues
      • X

        private double[][] X
      • work

        private double[] work
      • lwork

        private int lwork
      • iwork

        private int[] iwork
      • ifail

        private int[] ifail
      • info

        private int[] info
      • found

        private boolean[] found
      • Y

        private double[][] Y
      • totalWeight

        private int[] totalWeight
      • centroidDistances

        private double[][] centroidDistances
    • Constructor Detail

      • AlgorithmSpectralClustering

        public AlgorithmSpectralClustering​(ModelImage image,
                                           double[][] pos,
                                           double[] scale,
                                           int[] groupNum,
                                           double[][] centroidPos,
                                           java.lang.String resultsFileName,
                                           float[] redBuffer,
                                           float[] greenBuffer,
                                           float[] blueBuffer,
                                           double scaleMax,
                                           boolean scaleVariablesToUnitVariance)
    • Method Detail

      • finalize

        public void finalize()
        Prepares this class for destruction.
        Overrides:
        finalize in class AlgorithmBase
      • eval

        private double eval​(double sigma)
      • selfTest

        private void selfTest()