PandaRoot
PndMvaCluster Class Reference

#include <PndMvaCluster.h>

Public Member Functions

 PndMvaCluster (DataPoints const &InputData, size_t nCluster)
 
 PndMvaCluster (DataPoints const &InputData, size_t nCluster, bool const prune, bool const forceLabels)
 
virtual ~PndMvaCluster ()
 
virtual DataPointsCluster (ClusteringType const ClType=KMEANS_HARD)
 
virtual DataPointsClusterAndLabel (ClusteringType const ClType, std::vector< std::string > const &labels)
 
size_t GetNumberOfClusters () const
 
size_t GetClusterDimension () const
 
void SetNumberOfClusters (size_t val)
 
void Setprune (bool const prune=false)
 
void SetForceToLabel (bool const forceLabel=false)
 

Detailed Description

Definition at line 33 of file PndMvaCluster.h.

Constructor & Destructor Documentation

◆ PndMvaCluster() [1/2]

PndMvaCluster::PndMvaCluster ( DataPoints const &  InputData,
size_t  nCluster 
)
explicit

Constructor.

Parameters
InputDataInput Data points.
nClusterNumber of clusters to be created.

◆ PndMvaCluster() [2/2]

PndMvaCluster::PndMvaCluster ( DataPoints const &  InputData,
size_t  nCluster,
bool const  prune,
bool const  forceLabels 
)
explicit

Constructor.

Parameters
InputDataInput Data points.
nClusterNumber of clusters to be created.
prunePrune the created cluster.
forceLabelsForce to label the undecided and unknown points.

◆ ~PndMvaCluster()

virtual PndMvaCluster::~PndMvaCluster ( )
virtual

Destructor.

Member Function Documentation

◆ Cluster()

virtual DataPoints* PndMvaCluster::Cluster ( ClusteringType const  ClType = KMEANS_HARD)
virtual

Compute Cluster centers for the current input data.

Parameters
ClTypeClustering algorithm.
Returns
Vector containing the cluster centroids.

◆ ClusterAndLabel()

virtual DataPoints* PndMvaCluster::ClusterAndLabel ( ClusteringType const  ClType,
std::vector< std::string > const &  labels 
)
virtual

Compute Cluster centers for the current input data. The label of the majority of their members determines the label of the center.

Parameters
ClTypeClustering algorithm (default is KMEANS_HARD).
labelsThe labes of the currently available classes.
Returns
Vector containing the cluster centroids.

◆ GetClusterDimension()

size_t PndMvaCluster::GetClusterDimension ( ) const
inline

Get the dimension of the input data points.

Returns
Dimension of the data points.

Definition at line 171 of file PndMvaCluster.h.

172 {
173  return m_dimension;
174 };

◆ GetNumberOfClusters()

size_t PndMvaCluster::GetNumberOfClusters ( ) const
inline

Get the number of cluster centeroids.

Returns
Number of cluster centeroids.

Definition at line 166 of file PndMvaCluster.h.

167 {
168  return m_num_Cluster;
169 };

◆ SetForceToLabel()

void PndMvaCluster::SetForceToLabel ( bool const  forceLabel = false)
inline

The centroids that do not have a label (unknown, undecided) will get the label of the nearest data point from the input data set.

Parameters
forceLabelForce the labeling even if the determined label is unknown or undecided.

Definition at line 185 of file PndMvaCluster.h.

186 {
187  m_forceToLabel = label;
188 };

◆ SetNumberOfClusters()

void PndMvaCluster::SetNumberOfClusters ( size_t  val)
inline

Set the number of centroids.

Parameters
valNumber of centeroids.

Definition at line 176 of file PndMvaCluster.h.

177 {
178  m_num_Cluster = val;
179 };

◆ Setprune()

void PndMvaCluster::Setprune ( bool const  prune = false)
inline

Set if the created cluster list needs to be pruned. Remove the unknown and undecided labels.

Parameters
pruneIf prune after clustering.

Definition at line 181 of file PndMvaCluster.h.

182 {
183  m_prune = prune;
184 };

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