org.hisee.core
Class Projector

java.lang.Object
  |
  +--org.hisee.core.Projector
Direct Known Subclasses:
ProjectCoordinate, ProjectPCA, ProjectSammon

public abstract class Projector
extends java.lang.Object

Projector is a class describing a projection algorithm, which contains a high dimensional dataset (an "upstairs") and a low-dimensional projection of that high dimensional data (a "downstairs"). Classes which extend this class provide different ways of projecting the high dimensional space to the lowdimensional space. This class provides general methods for handling pairs of datasets and checking their integrity.


Field Summary
protected  java.lang.String addMethod
           
protected  Dataset downstairs
           
protected  Settings theSettings
           
protected  Dataset upstairs
           
 
Constructor Summary
Projector()
           
 
Method Summary
 void addDatapoint(double[] point)
          Add a datapoint to the upstairs dataset, and a corresponding point to the downstairs dataset.
 void addUpstairs(java.io.File theFile)
          Add new high-d datapoints and reinitialize the datasets
 void checkDatasets()
          Check validity of datasets
 boolean compareDatasets()
          Chcek the integrity of the two datasets by checking: (1) That the low-d set is at least 2 dimensions (2) That the low d space is lower dimensional than the hi d space (3) That both datasets have the same number of points
 java.lang.String getAddMethod()
           
 int getAddMethodIndex()
          Indices sed in populating combo box in general dialog
 Dataset getDownstairs()
           
 double getPerturbationAmount()
           
 Settings getTheSettings()
           
 double getTolerance()
           
 Dataset getUpstairs()
           
 void init(Dataset up, Dataset down)
          Initialize the projector with high and low-d data
 void init(int dims)
          Initilize a projector when only the dimension of the dataset is known
abstract  boolean isExtendible()
           
abstract  boolean isIterable()
           
abstract  double iterate()
          Iterate, if it is iterable.
abstract  void project()
          Perform operations necessay to project the data.
 void setAddMethod(java.lang.String string)
           
 void setPerturbationAmount(double d)
           
 void setTheSettings(Settings settings)
           
 void setTolerance(double d)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

upstairs

protected Dataset upstairs

downstairs

protected Dataset downstairs

theSettings

protected Settings theSettings

addMethod

protected java.lang.String addMethod
Constructor Detail

Projector

public Projector()
Method Detail

init

public void init(Dataset up,
                 Dataset down)
Initialize the projector with high and low-d data

Parameters:
up - Reference to high dimensional dataset
down - Reference to low dimensional dataset. Pass NULL if not available

checkDatasets

public void checkDatasets()
Check validity of datasets


init

public void init(int dims)
Initilize a projector when only the dimension of the dataset is known

Parameters:
dims - Dimensionality of the new dataset

addUpstairs

public void addUpstairs(java.io.File theFile)
Add new high-d datapoints and reinitialize the datasets

Parameters:
theFile - file containing the high-d data, forwarded to a dataset method

compareDatasets

public boolean compareDatasets()
Chcek the integrity of the two datasets by checking: (1) That the low-d set is at least 2 dimensions (2) That the low d space is lower dimensional than the hi d space (3) That both datasets have the same number of points

Returns:
true if low dimensions are lower than hi dimensions and low dimension is less than one

project

public abstract void project()
Perform operations necessay to project the data. For iterable functions this is just a stub.


iterate

public abstract double iterate()
Iterate, if it is iterable. For non iterable-projectors this is just a stub

Returns:
the current error

isIterable

public abstract boolean isIterable()
Returns:
true if this projection algorithm is iterable, false otherwise

isExtendible

public abstract boolean isExtendible()
Returns:
true if this projection algorithm accepts new new points, false otherwise

getUpstairs

public Dataset getUpstairs()
Returns:
the high-dimensional dataset

getDownstairs

public Dataset getDownstairs()
Returns:
the low dimensional dataset

addDatapoint

public void addDatapoint(double[] point)
Add a datapoint to the upstairs dataset, and a corresponding point to the downstairs dataset. Add the new point using the currently selected method

Parameters:
point - point to be added

getTolerance

public double getTolerance()
Returns:
distance within which points are considered unique

setTolerance

public void setTolerance(double d)
Parameters:
d - distance within which points are considered unique

getPerturbationAmount

public double getPerturbationAmount()
Returns:
amount by which to perturb datapoints which overlap

setPerturbationAmount

public void setPerturbationAmount(double d)
Parameters:
d - amount by which to perturb datapoints which overlap

getTheSettings

public Settings getTheSettings()
Returns:
reference to object which contains preferences which persist when the projector is re-initialized

setTheSettings

public void setTheSettings(Settings settings)
Parameters:
settings - reference to object which contains preferences which persist when the projector is re-initialized

getAddMethod

public java.lang.String getAddMethod()
Returns:
name of the add method currently selected

getAddMethodIndex

public int getAddMethodIndex()
Indices sed in populating combo box in general dialog

Returns:
index of the add method currently selected

setAddMethod

public void setAddMethod(java.lang.String string)
Parameters:
string -


for more information see hisee.sourceforge.net