|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttpp.TPPModel
public class TPPModel
A class that represents the TPP model: ie the original data, the current target and view, and the associated methods for manipulating these. This abstract base class does everything except initialise the projection.
Field Summary | |
---|---|
static java.lang.String |
CLASS_UNKNOWN
The value of the class attribute that indicates that the class of this instance is unknown. |
Constructor Summary | |
---|---|
TPPModel(int n)
Construct a new TPP model with the given output dimension |
Method Summary | |
---|---|
void |
addListener(TPPModelEventListener l)
|
boolean |
arePointsSelected()
Are any points selected? |
TPPModel |
clone()
|
Attribute |
cluster(int numClusters)
Create a new attribute that clusters the original data. |
Attribute[] |
createCrossValidation(Attribute at,
Classifier cls)
Perform 10-fold cross validation for the given attribute. |
void |
createHierarchicalClustering()
|
void |
createSeries(Attribute indexAttribute,
Attribute idAttribute)
Create a series in the instances using the given index and id attributes (specified by name). |
Attribute |
createTestSet(int k)
Create a test set comprising 1/k'th of the instances. |
Attribute |
getAttributeByName(java.lang.String name)
|
java.util.Enumeration<Attribute> |
getAttributes()
|
Matrix |
getCentroids(Attribute classification)
Get the centroids of the data points for the classes defined by the given attribute |
Matrix |
getData()
The normalised numeric data |
java.util.Vector<Attribute> |
getDateAttributes()
|
java.lang.String |
getDescriptionOfAttributes(int[] as)
|
java.lang.String |
getDescriptionOfInstance(int[] is)
|
Graph |
getGraph()
|
HierarchicalCluster |
getHierarchicalCluster()
|
Instances |
getInstances()
Get the underlying instances |
java.util.Vector<Attribute> |
getNominalAttributes()
|
Matrix |
getNormalisedDistances()
|
int |
getNumDataDimensions()
The number of dimensions in the numeric data |
int |
getNumDataPoints()
The number of points |
java.util.Vector<Attribute> |
getNumericAttributes()
|
int |
getNumViewDimensions()
Get the number of output dimensions |
java.lang.String[] |
getPointDescriptions()
Create an array of descriptions of each point, based on any string attributes |
boolean[] |
getPointsInTrainingSet()
Return a boolean array indicating whether each instance is a member of the training (true) or test (false) set. |
Matrix |
getProjection()
The current projection |
ProjectionConstraint |
getProjectionConstraint()
Return the constraint that any projection must meet. |
Attribute |
getSeparationAttribute()
|
Series |
getSeries()
Get the series defined within the data |
java.util.Vector<Attribute> |
getStringAttributes()
Get the string attributes. |
Matrix |
getTarget()
|
Attribute |
getTestAttribute()
Return the attribute that defines the test/prediction set. |
Matrix |
getView()
The view of the data |
java.lang.String |
getViewAsString()
|
int |
indexOf(Attribute att)
Get the index of the attribute within the instances (starting at 0; returns -1 if not found. |
int |
indexOf(Instance in)
returns -1 if not found. |
boolean |
isPointInTestingSet(int p)
Is a specific point in the testing set or is the classification of it unknown. |
boolean |
isPointSelected(int p)
|
void |
loadGraph(Graph graph)
|
void |
nominalToBinary(Attribute nominal)
Convert a nominal attribute into N x binary numeric attributes |
void |
normalizeDataUnit()
Normalize the numeric data from the filtered instances to the range [0,1] (ie the minimum data value will be reset to 0 and maximum to 1. |
void |
normalizeProjection()
|
int |
numPointsSelected()
How many points are currently selected |
void |
PCA()
|
void |
project()
Project the data to produce a new view. |
void |
pursueTarget()
Pursue a projection that will map the target onto the projection until convergence. |
void |
pursueTargetSingleShot()
Pursue a projection that will map the target onto the projection, but just take a single step. |
void |
randomProjection()
|
double[] |
removeAttribute(Attribute at)
Remove an attribute, returning the values |
void |
removeGraph()
|
void |
removeSeries()
|
void |
removeTestSet()
|
void |
selectPoint(int p)
|
void |
selectPoints(int[] p)
|
void |
selectSingleAttribute(Attribute at)
Select a single numeric attribute |
void |
setInstances(Instances in)
|
void |
setProjectionConstraint(ProjectionConstraint constraint)
Set a constraint on what constitutes a valid projection. |
void |
setProjectionValues(double[][] values)
|
void |
setSeparationAttribute(Attribute at)
The attribute used to separate points |
void |
setTarget(Matrix matrix)
Set the target that the projection is pursuing |
java.lang.String |
toString(int point)
|
void |
uniformProjection()
Create uniform projection in which each attribute has unit weight. |
void |
unselectPoints()
|
void |
zeroProjectionAttributes(int[] ats)
Set the input from the selected attributes to zero -- ie remove them temporarily from teh projection |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_UNKNOWN
Constructor Detail |
---|
public TPPModel(int n)
Method Detail |
---|
public int getNumViewDimensions()
public void setInstances(Instances in) throws java.lang.Exception
java.lang.Exception
public void normalizeDataUnit() throws java.lang.Exception
java.lang.Exception
public Attribute getAttributeByName(java.lang.String name)
public void nominalToBinary(Attribute nominal) throws java.lang.Exception
java.lang.Exception
public java.lang.String getDescriptionOfInstance(int[] is)
public java.lang.String getDescriptionOfAttributes(int[] as)
public Series getSeries()
public void removeSeries()
public void createSeries(Attribute indexAttribute, Attribute idAttribute)
java.lang.Exception
public Attribute createTestSet(int k)
k
-
java.lang.Exception
public Attribute getTestAttribute()
public void removeTestSet()
public boolean[] getPointsInTrainingSet()
public boolean isPointInTestingSet(int p)
public int indexOf(Attribute att)
public int indexOf(Instance in)
public void normalizeProjection()
public void randomProjection()
public void PCA()
public Instances getInstances()
public Matrix getNormalisedDistances()
public Matrix getTarget()
public Matrix getProjection()
public Matrix getView()
public java.lang.String getViewAsString()
public Matrix getData()
public int getNumDataPoints()
public int getNumDataDimensions()
public java.util.Vector<Attribute> getStringAttributes()
public java.util.Vector<Attribute> getNominalAttributes()
public java.util.Vector<Attribute> getNumericAttributes()
public java.util.Vector<Attribute> getDateAttributes()
public void setTarget(Matrix matrix)
public void project()
public void pursueTarget() throws TPPException
TPPException
public void pursueTargetSingleShot() throws TPPException
TPPException
public ProjectionConstraint getProjectionConstraint()
public void setProjectionConstraint(ProjectionConstraint constraint)
public Attribute cluster(int numClusters)
public java.lang.String toString(int point)
public void zeroProjectionAttributes(int[] ats)
public void setSeparationAttribute(Attribute at)
public Attribute getSeparationAttribute()
public void createHierarchicalClustering()
public HierarchicalCluster getHierarchicalCluster()
public boolean isPointSelected(int p)
public boolean arePointsSelected()
public void unselectPoints()
public void selectPoint(int p)
public void selectPoints(int[] p)
public int numPointsSelected()
public Attribute[] createCrossValidation(Attribute at, Classifier cls)
cls
- public double[] removeAttribute(Attribute at)
public void selectSingleAttribute(Attribute at) throws java.lang.Exception
java.lang.Exception
public void uniformProjection() throws java.lang.Exception
java.lang.Exception
public Matrix getCentroids(Attribute classification) throws java.lang.Exception
java.lang.Exception
public void setProjectionValues(double[][] values)
public java.lang.String[] getPointDescriptions()
public void loadGraph(Graph graph)
public void removeGraph()
public Graph getGraph()
public java.util.Enumeration<Attribute> getAttributes()
public void addListener(TPPModelEventListener l)
public TPPModel clone()
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |