ActiViz .NET  5.8.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Private Member Functions | Static Private Member Functions
Kitware.VTK.vtkKMeansStatistics Class Reference

vtkKMeansStatistics - A class for KMeans clustering More...

Inheritance diagram for Kitware.VTK.vtkKMeansStatistics:
[legend]
Collaboration diagram for Kitware.VTK.vtkKMeansStatistics:
[legend]

List of all members.

Public Member Functions

 vtkKMeansStatistics (IntPtr rawCppThis, bool callDisposalMethod, bool strong)
 Automatically generated constructor - called from generated code. DO NOT call directly.
 vtkKMeansStatistics ()
 Undocumented Block.
override void Aggregate (vtkDataObjectCollection arg0, vtkMultiBlockDataSet arg1)
 Given a collection of models, calculate aggregate model NB: not implemented.
virtual int GetDefaultNumberOfClusters ()
 Set/get the DefaultNumberOfClusters, used when no initial cluster coordinates are specified.
virtual vtkKMeansDistanceFunctor GetDistanceFunctor ()
 Set the DistanceFunctor.
virtual string GetKValuesArrayName ()
 Set/get the KValuesArrayName.
virtual int GetMaxNumIterations ()
 Set/get the MaxNumIterations used to terminate iterations on cluster center coordinates when the relative tolerance can not be met.
virtual double GetTolerance ()
 Set/get the relative Tolerance used to terminate iterations on cluster center coordinates.
override int IsA (string type)
 Undocumented Block.
new vtkKMeansStatistics NewInstance ()
 Undocumented Block.
virtual void SetDefaultNumberOfClusters (int _arg)
 Set/get the DefaultNumberOfClusters, used when no initial cluster coordinates are specified.
virtual void SetDistanceFunctor (vtkKMeansDistanceFunctor arg0)
 Set the DistanceFunctor.
virtual void SetKValuesArrayName (string _arg)
 Set/get the KValuesArrayName.
virtual void SetMaxNumIterations (int _arg)
 Set/get the MaxNumIterations used to terminate iterations on cluster center coordinates when the relative tolerance can not be met.
virtual void SetTolerance (double _arg)
 Set/get the relative Tolerance used to terminate iterations on cluster center coordinates.

Static Public Member Functions

static new vtkKMeansStatistics New ()
 Undocumented Block.
static new int IsTypeOf (string type)
 Undocumented Block.
static new vtkKMeansStatistics SafeDownCast (vtkObjectBase o)
 Undocumented Block.

Public Attributes

new const string MRFullTypeName = "Kitware.VTK.vtkKMeansStatistics"
 Automatically generated type registration mechanics.

Static Public Attributes

static new readonly string MRClassNameKey = "19vtkKMeansStatistics"
 Automatically generated type registration mechanics.

Protected Member Functions

override void Dispose (bool disposing)
 Automatically generated protected Dispose method - called from public Dispose or the C# destructor. DO NOT call directly.

Private Member Functions

static internal IntPtr vtkKMeansStatistics_New (ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal void vtkKMeansStatistics_Aggregate_01 (HandleRef pThis, HandleRef arg0, HandleRef arg1)
static internal int vtkKMeansStatistics_GetDefaultNumberOfClusters_02 (HandleRef pThis)
static internal IntPtr vtkKMeansStatistics_GetDistanceFunctor_03 (HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal IntPtr vtkKMeansStatistics_GetKValuesArrayName_04 (HandleRef pThis)
static internal int vtkKMeansStatistics_GetMaxNumIterations_05 (HandleRef pThis)
static internal double vtkKMeansStatistics_GetTolerance_06 (HandleRef pThis)
static internal int vtkKMeansStatistics_IsA_07 (HandleRef pThis, string type)
static internal int vtkKMeansStatistics_IsTypeOf_08 (string type)
static internal IntPtr vtkKMeansStatistics_NewInstance_10 (HandleRef pThis, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal IntPtr vtkKMeansStatistics_SafeDownCast_11 (HandleRef o, ref uint mteStatus, ref uint mteIndex, ref uint rawRefCount)
static internal void vtkKMeansStatistics_SetDefaultNumberOfClusters_12 (HandleRef pThis, int _arg)
static internal void vtkKMeansStatistics_SetDistanceFunctor_13 (HandleRef pThis, HandleRef arg0)
static internal void vtkKMeansStatistics_SetKValuesArrayName_14 (HandleRef pThis, string _arg)
static internal void vtkKMeansStatistics_SetMaxNumIterations_15 (HandleRef pThis, int _arg)
static internal void vtkKMeansStatistics_SetTolerance_16 (HandleRef pThis, double _arg)

Static Private Member Functions

static vtkKMeansStatistics ()
 Automatically generated type registration mechanics.

Detailed Description

vtkKMeansStatistics - A class for KMeans clustering

Description This class takes as input an optional vtkTable on port LEARN_PARAMETERS specifying initial set(s) of cluster values of the following form: <pre> K | Col1 | ... | ColN -----------+-----------------+---------+--------------- M |clustCoord(1, 1) | ... | clustCoord(1, N) M |clustCoord(2, 1) | ... | clustCoord(2, N) . | . | . | . . | . | . | . . | . | . | . M |clustCoord(M, 1) | ... | clustCoord(M, N) L |clustCoord(1, 1) | ... | clustCoord(1, N) L |clustCoord(2, 1) | ... | clustCoord(2, N) . | . | . | . . | . | . | . . | . | . | . L |clustCoord(L, 1) | ... | clustCoord(L, N) </pre>

Because the desired value of K is often not known in advance and the results of the algorithm are dependent on the initial cluster centers, we provide a mechanism for the user to test multiple runs or sets of cluster centers within a single call to the Learn phase. The first column of the table identifies the number of clusters K in the particular run (the entries in this column should be of type vtkIdType), while the remaining columns are a subset of the columns contained in the table on port INPUT_DATA. We require that all user specified clusters be of the same dimension N and consequently, that the LEARN_PARAMETERS table have N+1 columns. Due to this restriction, only one request can be processed for each call to the Learn phase and subsequent requests are silently ignored. Note that, if the first column of the LEARN_PARAMETERS table is not of type vtkIdType, then the table will be ignored and a single run will be performed using the first DefaultNumberOfClusters input data observations as initial cluster centers.

When the user does not supply an initial set of clusters, then the first DefaultNumberOfClusters input data observations are used as initial cluster centers and a single run is performed.

This class provides the following functionalities, depending on the mode it is executed in: Learn: calculates new cluster centers for each run. The output metadata on port OUTPUT_MODEL is a multiblock dataset containing at a minimum one vtkTable with columns specifying the following for each run: the run ID, number of clusters, number of iterations required for convergence, total error associated with the cluster (sum of squared Euclidean distance from each observation to its nearest cluster center), the cardinality of the cluster, and the new cluster coordinates.

Derive: An additional vtkTable is stored in the multiblock dataset output on port OUTPUT_MODEL. This table contains columns that store for each run: the runID, number of clusters, total error for all clusters in the run, local rank, and global rank. The local rank is computed by comparing squared Euclidean errors of all runs with the same number of clusters. The global rank is computed analagously across all runs.

Assess: This requires a multiblock dataset (as computed from Learn and Derive) on input port INPUT_MODEL and tabular data on input port INPUT_DATA that contains column names matching those of the tables on input port INPUT_MODEL. The assess mode reports the closest cluster center and associated squared Euclidean distance of each observation in port INPUT_DATA's table to the cluster centers for each run in the multiblock dataset provided on port INPUT_MODEL.

The code can handle a wide variety of data types as it operates on vtkAbstractArrays and is not limited to vtkDataArrays. A default distance functor that computes the sum of the squares of the Euclidean distance between two objects is provided (vtkKMeansDistanceFunctor). The default distance functor can be overridden to use alternative distance metrics.

Thanks Thanks to Janine Bennett, David Thompson, and Philippe Pebay of Sandia National Laboratories for implementing this class.


Constructor & Destructor Documentation

Automatically generated type registration mechanics.

Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics ( IntPtr  rawCppThis,
bool  callDisposalMethod,
bool  strong 
)

Automatically generated constructor - called from generated code. DO NOT call directly.

Undocumented Block.


Member Function Documentation

Given a collection of models, calculate aggregate model NB: not implemented.

Reimplemented from Kitware.VTK.vtkStatisticsAlgorithm.

override void Kitware.VTK.vtkKMeansStatistics.Dispose ( bool  disposing) [protected]

Automatically generated protected Dispose method - called from public Dispose or the C# destructor. DO NOT call directly.

Reimplemented from Kitware.VTK.vtkStatisticsAlgorithm.

Reimplemented in Kitware.VTK.vtkPKMeansStatistics.

Set/get the DefaultNumberOfClusters, used when no initial cluster coordinates are specified.

Set the DistanceFunctor.

Here is the call graph for this function:

Set/get the KValuesArrayName.

Set/get the MaxNumIterations used to terminate iterations on cluster center coordinates when the relative tolerance can not be met.

virtual double Kitware.VTK.vtkKMeansStatistics.GetTolerance ( ) [virtual]

Set/get the relative Tolerance used to terminate iterations on cluster center coordinates.

override int Kitware.VTK.vtkKMeansStatistics.IsA ( string  type) [virtual]

Undocumented Block.

Reimplemented from Kitware.VTK.vtkStatisticsAlgorithm.

Reimplemented in Kitware.VTK.vtkPKMeansStatistics.

static new int Kitware.VTK.vtkKMeansStatistics.IsTypeOf ( string  type) [static]

Undocumented Block.

Reimplemented from Kitware.VTK.vtkStatisticsAlgorithm.

Reimplemented in Kitware.VTK.vtkPKMeansStatistics.

Undocumented Block.

Reimplemented from Kitware.VTK.vtkTableAlgorithm.

Reimplemented in Kitware.VTK.vtkPKMeansStatistics.

Undocumented Block.

Reimplemented from Kitware.VTK.vtkStatisticsAlgorithm.

Reimplemented in Kitware.VTK.vtkPKMeansStatistics.

Undocumented Block.

Reimplemented from Kitware.VTK.vtkStatisticsAlgorithm.

Reimplemented in Kitware.VTK.vtkPKMeansStatistics.

Here is the call graph for this function:

virtual void Kitware.VTK.vtkKMeansStatistics.SetDefaultNumberOfClusters ( int  _arg) [virtual]

Set/get the DefaultNumberOfClusters, used when no initial cluster coordinates are specified.

Set the DistanceFunctor.

virtual void Kitware.VTK.vtkKMeansStatistics.SetKValuesArrayName ( string  _arg) [virtual]

Set/get the KValuesArrayName.

virtual void Kitware.VTK.vtkKMeansStatistics.SetMaxNumIterations ( int  _arg) [virtual]

Set/get the MaxNumIterations used to terminate iterations on cluster center coordinates when the relative tolerance can not be met.

virtual void Kitware.VTK.vtkKMeansStatistics.SetTolerance ( double  _arg) [virtual]

Set/get the relative Tolerance used to terminate iterations on cluster center coordinates.

static internal void Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_Aggregate_01 ( HandleRef  pThis,
HandleRef  arg0,
HandleRef  arg1 
) [private]
static internal IntPtr Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_GetDistanceFunctor_03 ( HandleRef  pThis,
ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal IntPtr Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_GetKValuesArrayName_04 ( HandleRef  pThis) [private]
static internal int Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_GetMaxNumIterations_05 ( HandleRef  pThis) [private]
static internal double Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_GetTolerance_06 ( HandleRef  pThis) [private]
static internal int Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_IsA_07 ( HandleRef  pThis,
string  type 
) [private]
static internal int Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_IsTypeOf_08 ( string  type) [private]
static internal IntPtr Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_New ( ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal IntPtr Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_NewInstance_10 ( HandleRef  pThis,
ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal IntPtr Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_SafeDownCast_11 ( HandleRef  o,
ref uint  mteStatus,
ref uint  mteIndex,
ref uint  rawRefCount 
) [private]
static internal void Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_SetDefaultNumberOfClusters_12 ( HandleRef  pThis,
int  _arg 
) [private]
static internal void Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_SetDistanceFunctor_13 ( HandleRef  pThis,
HandleRef  arg0 
) [private]
static internal void Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_SetKValuesArrayName_14 ( HandleRef  pThis,
string  _arg 
) [private]
static internal void Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_SetMaxNumIterations_15 ( HandleRef  pThis,
int  _arg 
) [private]
static internal void Kitware.VTK.vtkKMeansStatistics.vtkKMeansStatistics_SetTolerance_16 ( HandleRef  pThis,
double  _arg 
) [private]

Member Data Documentation

new readonly string Kitware.VTK.vtkKMeansStatistics.MRClassNameKey = "19vtkKMeansStatistics" [static]

Automatically generated type registration mechanics.

Reimplemented from Kitware.VTK.vtkStatisticsAlgorithm.

Reimplemented in Kitware.VTK.vtkPKMeansStatistics.

new const string Kitware.VTK.vtkKMeansStatistics.MRFullTypeName = "Kitware.VTK.vtkKMeansStatistics"

Automatically generated type registration mechanics.

Reimplemented from Kitware.VTK.vtkStatisticsAlgorithm.

Reimplemented in Kitware.VTK.vtkPKMeansStatistics.


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