jminhep.cluster
Class Get

java.lang.Object
  extended by jminhep.cluster.Get

public class Get
extends java.lang.Object

Some useful methods related to the clustering procedure


Constructor Summary
Get()
           
 
Method Summary
static double calcDistance(double[] a1, double[] a2)
          This method calculates the Euclidean distance between two N-ncolsional vectors.
static double calcSquaredDistance(double[] a1, double[] a2)
          This method calculates the squared distance between two N-dimesional vectors.
static double compactness(double[][] indat, int[] assignment, int numClusters, double[][] clusterCenters)
          This method returns the cluster compactness
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Get

public Get()
Method Detail

compactness

public static double compactness(double[][] indat,
                                 int[] assignment,
                                 int numClusters,
                                 double[][] clusterCenters)
This method returns the cluster compactness

Parameters:
indat[][] - data matrix
numClusters - number of clusters
clusterCenters[][] - cluster centers
Returns:
compactness

calcSquaredDistance

public static double calcSquaredDistance(double[] a1,
                                         double[] a2)
This method calculates the squared distance between two N-dimesional vectors.

Parameters:
a1 - the first data vector.
a2 - the second data vector.
Returns:
the squared distance between those vectors.

calcDistance

public static double calcDistance(double[] a1,
                                  double[] a2)
This method calculates the Euclidean distance between two N-ncolsional vectors.

Parameters:
a1 - the first data vector.
a2 - the second data vector.
Returns:
the Euclidean distance between those vectors.


jHepWork 1.1 (C) Chekanov