Class pmr.stat.Multivariate
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.stat.Multivariate
java.lang.Object

+pmr.stat.Stat

+pmr.stat.DrawableStat

+pmr.stat.Multivariate
 public class Multivariate
 extends DrawableStat
Multivariate  Multivariate class
This class holds a RealMatrix consisting of ndata vectors of
length mdim. (If your data is organised differently, you may need
to transpose.) It's early days yet, but we are starting with
cluster analysis and simple principal components. Some routines
may also work with just an n*n distance matrix or correlation
matrix  we'll have to see.
 Author:
 (C) P. MurrayRust, 1996

AVLINK


CENTROID


CLINK


GOWER


MCQUITTY


SLINK


TABLE
 display types

WARD
 different clustering methods

Multivariate()
 creates it with default data arrays

Multivariate(RealMatrix)
 creates a Multivariate data matrix (m columns, n rows of data)

Multivariate(RealSquareMatrix)
 creates a asquare data matrix for distances

display(Graphics)
 used by the ScrollableTopLevel to paint the object, or can be used to
draw the object to somewhere else.

display(Graphics, Component)
 this may encapsulate the above routine, as we often need the component, e.g.

getTitle()


hierarchicalCluster(int)
 Hierarchical clustering.

main(String[])
 tests Multivariate routines

mouseUp(Event, int, int)
 action when mouse is unclicked; if not overridden, no action

nonLinearMap(int, RealMatrix, int)
 still being developed.

printAgglomeration()
 print the agglomeration history of a cluster analysis
on System.out.

printDendrogram()
 print the dendrogram of a cluster analysis on
System.out.

process()
 most objects need some processing before they can be redrawn.

setDisplay(int)
 sets display type:

stnlmp(int, int, int, int, double[][], double[][])


stnlmp1(int, int, int, double[][], double[][])

WARD
public final static int WARD
 different clustering methods
SLINK
public final static int SLINK
CLINK
public final static int CLINK
AVLINK
public final static int AVLINK
MCQUITTY
public final static int MCQUITTY
GOWER
public final static int GOWER
CENTROID
public final static int CENTROID
TABLE
public final static int TABLE
 display types
Multivariate
public Multivariate()
 creates it with default data arrays
Multivariate
public Multivariate(RealMatrix m)
 creates a Multivariate data matrix (m columns, n rows of data)
Multivariate
public Multivariate(RealSquareMatrix mat)
 creates a asquare data matrix for distances
setDisplay
public void setDisplay(int type)
 sets display type:
hierarchicalCluster
public void hierarchicalCluster(int method) throws ArrayTooSmallException
 Hierarchical clustering. Algorithm and initial code taken
(with many thanks) from the ASA Statlib resource
(http:slashslashlib.stat.cmu.edu).
method is one of 7 switches (Multivariate.WARD, etc).
 Multivariate.WARD WARD'S MINIMUM VARIANCE METHOD
 Multivariate.SLINK SINGLE LINK METHOD
 Multivariate.CLINK COMPLETE LINK METHOD
 Multivariate.AVLINK AVERAGE LINK (OR GROUP AVERAGE) METHOD
 Multivariate.MCQUITTY MCQUITTY'S METHOD
 Multivariate.GOWER MEDIAN (GOWER'S) METHOD
 Multivariate.CENTROID CENTROID METHOD
 Throws: ArrayTooSmallException
 data matrix has <= 2 rows and <= 1 dimensions.
printAgglomeration
public void printAgglomeration()
 print the agglomeration history of a cluster analysis
on System.out. Very crude!
printDendrogram
public void printDendrogram()
 print the dendrogram of a cluster analysis on
System.out. this is very crude at present !
nonLinearMap
public int nonLinearMap(int ndim,
RealMatrix map,
int method) throws ArrayTooSmallException
 still being developed. method = 0 is orginal, 1 is hacked
neither seems to be any good ...
 Throws: ArrayTooSmallException
 nonLinearMap requires several points to avoid pathological behaviour
stnlmp1
public static int stnlmp1(int mvar,
int ncase,
int ndim,
double zdata[][],
double xcoord[][])
stnlmp
public static int stnlmp(int mvar,
int ncase,
int ndim,
int norm,
double zdata[][],
double xcoord[][])
display
public void display(Graphics g)
 used by the ScrollableTopLevel to paint the object, or can be used to
draw the object to somewhere else.
 Overrides:
 display in class DrawableStat
display
public void display(Graphics g,
Component comp)
 this may encapsulate the above routine, as we often need the component, e.g.
 Overrides:
 display in class DrawableStat
getTitle
public String getTitle()
 Overrides:
 getTitle in class Stat
mouseUp
public boolean mouseUp(Event evt,
int x,
int y)
 action when mouse is unclicked; if not overridden, no action
 Overrides:
 mouseUp in class DrawableStat
process
public void process()
 most objects need some processing before they can be redrawn.
 Overrides:
 process in class Stat
main
public static void main(String args[])
 tests Multivariate routines
All Packages Class Hierarchy This Package Previous Next Index