ParaView
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkPSciVizKMeans Class Reference

Find k cluster centers and/or assess the closest center and distance to it for each datum. More...

#include <vtkPSciVizKMeans.h>

Inheritance diagram for vtkPSciVizKMeans:
Inheritance graph
[legend]
Collaboration diagram for vtkPSciVizKMeans:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
virtual void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetK (int)
virtual int GetK ()
virtual void SetMaxNumIterations (int)
virtual int GetMaxNumIterations ()
virtual void SetTolerance (double)
virtual double GetTolerance ()

Static Public Member Functions

static vtkPSciVizKMeansNew ()
static int IsTypeOf (const char *type)
static vtkPSciVizKMeansSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkPSciVizKMeans ()
virtual ~vtkPSciVizKMeans ()
virtual int LearnAndDerive (vtkMultiBlockDataSet *model, vtkTable *inData)
virtual int AssessData (vtkTable *observations, vtkDataObject *dataset, vtkMultiBlockDataSet *model)

Protected Attributes

int K
int MaxNumIterations
double Tolerance

Detailed Description

Find k cluster centers and/or assess the closest center and distance to it for each datum.

This filter either computes a statistical model of a dataset or takes such a model as its second input. Then, the model (however it is obtained) may optionally be used to assess the input dataset.

This filter iteratively computes the center of k clusters in a space whose coordinates are specified by the arrays you select. The clusters are chosen as local minima of the sum of square Euclidean distances from each point to its nearest cluster center. The model is then a set of cluster centers. Data is assessed by assigning a cluster center and distance to the cluster to each point in the input data set.

Definition at line 37 of file vtkPSciVizKMeans.h.


Constructor & Destructor Documentation

vtkPSciVizKMeans::vtkPSciVizKMeans ( ) [protected]
virtual vtkPSciVizKMeans::~vtkPSciVizKMeans ( ) [protected, virtual]

Member Function Documentation

static vtkPSciVizKMeans* vtkPSciVizKMeans::New ( ) [static]

Reimplemented from vtkTableAlgorithm.

virtual const char* vtkPSciVizKMeans::GetClassName ( ) [virtual]

Reimplemented from vtkSciVizStatistics.

static int vtkPSciVizKMeans::IsTypeOf ( const char *  type) [static]

Reimplemented from vtkSciVizStatistics.

virtual int vtkPSciVizKMeans::IsA ( const char *  type) [virtual]

Reimplemented from vtkSciVizStatistics.

static vtkPSciVizKMeans* vtkPSciVizKMeans::SafeDownCast ( vtkObject o) [static]

Reimplemented from vtkSciVizStatistics.

virtual void vtkPSciVizKMeans::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkSciVizStatistics.

virtual void vtkPSciVizKMeans::SetK ( int  ) [virtual]

The number of cluster centers. The initial centers will be chosen randomly. In the future the filter will accept an input table of initial cluster positions. The default value of K is 5.

virtual int vtkPSciVizKMeans::GetK ( ) [virtual]

The number of cluster centers. The initial centers will be chosen randomly. In the future the filter will accept an input table of initial cluster positions. The default value of K is 5.

virtual void vtkPSciVizKMeans::SetMaxNumIterations ( int  ) [virtual]

The maximum number of iterations to perform when converging on cluster centers. The default value is 50 iterations.

virtual int vtkPSciVizKMeans::GetMaxNumIterations ( ) [virtual]

The maximum number of iterations to perform when converging on cluster centers. The default value is 50 iterations.

virtual void vtkPSciVizKMeans::SetTolerance ( double  ) [virtual]

The relative tolerance on cluster centers that will cause early termination of the algorithm. The default value is 0.01: a 1 percent change in cluster coordinates.

virtual double vtkPSciVizKMeans::GetTolerance ( ) [virtual]

The relative tolerance on cluster centers that will cause early termination of the algorithm. The default value is 0.01: a 1 percent change in cluster coordinates.

virtual int vtkPSciVizKMeans::LearnAndDerive ( vtkMultiBlockDataSet model,
vtkTable inData 
) [protected, virtual]

Method subclasses must override to calculate a full model from the given input data. The model should be placed on the first output port of the passed vtkInformationVector as well as returned in the model parameter.

Implements vtkSciVizStatistics.

virtual int vtkPSciVizKMeans::AssessData ( vtkTable observations,
vtkDataObject dataset,
vtkMultiBlockDataSet model 
) [protected, virtual]

Method subclasses must override to assess an input table given a model of the proper type. The dataset parameter contains a shallow copy of input port 0 and should be modified to include the assessment. Adding new arrays to point/cell/vertex/edge data should not pose a problem, but any alterations to the dataset itself will probably require that you create a deep copy before modification.

Parameters:
observations- a table containing the field data of the dataset converted to a table
dataset- a shallow copy of the input dataset that should be altered to include an assessment of the output.
model- the statistical model with which to assess the observations.

Implements vtkSciVizStatistics.


Member Data Documentation

int vtkPSciVizKMeans::K [protected]

Definition at line 74 of file vtkPSciVizKMeans.h.

Definition at line 75 of file vtkPSciVizKMeans.h.

Definition at line 76 of file vtkPSciVizKMeans.h.


The documentation for this class was generated from the following file: