Go to the documentation of this file.
102 #ifndef vtkKMeansStatistics_h
103 #define vtkKMeansStatistics_h
105 #include "vtkFiltersStatisticsModule.h"
134 vtkGetMacro(DefaultNumberOfClusters,
int);
141 vtkSetStringMacro(KValuesArrayName);
151 vtkGetMacro( MaxNumIterations,
int );
160 vtkGetMacro( Tolerance,
double );
204 vtkTable* ) VTK_OVERRIDE {
return; };
virtual void UpdateClusterCenters(vtkTable *newClusterElements, vtkTable *curClusterElements, vtkIdTypeArray *numMembershipChanges, vtkIdTypeArray *numElementsInCluster, vtkDoubleArray *error, vtkIdTypeArray *startRunID, vtkIdTypeArray *endRunID, vtkIntArray *computeRun)
Subroutine to update new cluster centers from the old centers.
void Aggregate(vtkDataObjectCollection *, vtkMultiBlockDataSet *) override
Given a collection of models, calculate aggregate model NB: not implemented.
maintain an unordered list of data objects
A table, which contains similar-typed columns of data.
virtual void CreateInitialClusterCenters(vtkIdType numToAllocate, vtkIdTypeArray *numberOfClusters, vtkTable *inData, vtkTable *curClusterElements, vtkTable *newClusterElements)
Subroutine to initialize cluster centerss if not provided by the user.
measure distance from k-means cluster centers
int DefaultNumberOfClusters
This is the default number of clusters used when the user does not provide initial cluster centers.
double Tolerance
This is the percentage of data elements that swap cluster IDs.
A base class for a functor that assesses data.
Composite dataset that organizes datasets into blocks.
int InitializeDataAndClusterCenters(vtkTable *inParameters, vtkTable *inData, vtkTable *dataElements, vtkIdTypeArray *numberOfClusters, vtkTable *curClusterElements, vtkTable *newClusterElements, vtkIdTypeArray *startRunID, vtkIdTypeArray *endRunID)
Subroutine to initalize the cluster centers using those provided by the user in input port LEARN_PARA...
~vtkKMeansStatistics() override
static vtkKMeansStatistics * New()
virtual void SetDistanceFunctor(vtkKMeansDistanceFunctor *)
Set the DistanceFunctor.
void SelectAssessFunctor(vtkTable *inData, vtkDataObject *inMeta, vtkStringArray *rowNames, AssessFunctor *&dfunc) override
Provide the appropriate assessment functor.
vtkKMeansDistanceFunctor * DistanceFunctor
This is the Distance functor.
char * KValuesArrayName
This is the name of the column that specifies the number of clusters in each run.
int MaxNumIterations
This is the maximum number of iterations allowed if the new cluster centers have not yet converged.
virtual vtkIdType GetTotalNumberOfObservations(vtkIdType numObservations)
Subroutine to get the total number of observations.
bool SetParameter(const char *parameter, int index, vtkVariant value) override
A convenience method for setting properties by name.
a simple class to control print indentation
dynamic, self-adjusting array of int
A atomic type representing the union of many types.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
dynamic, self-adjusting array of vtkIdType
Tests instantiations of the vtkNew class template.
a vtkAbstractArray subclass for strings
A class for KMeans clustering.
dynamic, self-adjusting array of double
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Base class for statistics algorithms.
general representation of visualization data