Clusters defined by a binary space partitioning tree. More...
#include <shark/Models/Clustering/HierarchicalClustering.h>
Public Types | |
typedef base_type::BatchInputType | BatchInputType |
typedef base_type::BatchOutputType | BatchOutputType |
Public Types inherited from shark::AbstractClustering< InputT > | |
enum | Feature { HAS_SOFT_MEMBERSHIP = 1 } |
typedef InputT | InputType |
typedef unsigned int | OutputType |
typedef Batch< InputType >::type | BatchInputType |
typedef Batch< OutputType >::type | BatchOutputType |
typedef TypedFlags< Feature > | Features |
typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException |
Public Types inherited from shark::IParameterizable< VectorType > | |
typedef VectorType | ParameterVectorType |
Public Member Functions | |
HierarchicalClustering (const tree_type *tree) | |
Constructor. | |
std::string | name () const |
From INameable: return the class name. | |
Shape | inputShape () const |
std::size_t | numberOfClusters () const |
Return the number of clusters. | |
BatchOutputType | hardMembership (BatchInputType const &patterns) const |
Return the best matching cluster for very pattern in the batch. | |
RealVector | parameterVector () const |
from IParameterizable | |
void | setParameterVector (RealVector const &newParameters) |
from IParameterizable | |
std::size_t | numberOfParameters () const |
from IParameterizable | |
Public Member Functions inherited from shark::AbstractClustering< InputT > | |
const Features & | features () const |
virtual void | updateFeatures () |
bool | hasSoftMembershipFunction () const |
virtual unsigned int | hardMembership (InputType const &pattern) const |
Compute best matching cluster. | |
virtual RealVector | softMembership (InputType const &pattern) const |
Compute cluster membership function. | |
virtual RealMatrix | softMembership (BatchInputType const &patterns) const |
Compute cluster membership function. | |
void | read (InArchive &archive) |
empty default implementation of ISerializable::read | |
void | write (OutArchive &archive) const |
empty default implementation of ISerializable::write | |
Public Member Functions inherited from shark::INameable | |
virtual | ~INameable () |
Public Member Functions inherited from shark::IParameterizable< VectorType > | |
virtual | ~IParameterizable () |
Public Member Functions inherited from shark::ISerializable | |
virtual | ~ISerializable () |
Virtual d'tor. | |
void | load (InArchive &archive, unsigned int version) |
Versioned loading of components, calls read(...). | |
void | save (OutArchive &archive, unsigned int version) const |
Versioned storing of components, calls write(...). | |
BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Protected Attributes | |
tree_type const * | mep_tree |
binary tree | |
Protected Attributes inherited from shark::AbstractClustering< InputT > | |
Features | m_features |
Clusters defined by a binary space partitioning tree.
Definition at line 60 of file HierarchicalClustering.h.
typedef base_type::BatchInputType shark::HierarchicalClustering< InputT >::BatchInputType |
Definition at line 65 of file HierarchicalClustering.h.
typedef base_type::BatchOutputType shark::HierarchicalClustering< InputT >::BatchOutputType |
Definition at line 66 of file HierarchicalClustering.h.
|
inline |
Constructor.
tree | tree object underlying the clustering |
Definition at line 74 of file HierarchicalClustering.h.
References SHARK_RUNTIME_CHECK.
|
inlinevirtual |
Return the best matching cluster for very pattern in the batch.
Reimplemented from shark::AbstractClustering< InputT >.
Definition at line 93 of file HierarchicalClustering.h.
References shark::batchSize(), shark::BinaryTree< InputT >::hasChildren(), shark::BinaryTree< InputT >::isLeft(), shark::BinaryTree< InputT >::left(), shark::HierarchicalClustering< InputT >::mep_tree, shark::BinaryTree< InputT >::nodes(), and shark::BinaryTree< InputT >::right().
|
inlinevirtual |
Implements shark::AbstractClustering< InputT >.
Definition at line 83 of file HierarchicalClustering.h.
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 80 of file HierarchicalClustering.h.
|
inlinevirtual |
Return the number of clusters.
Implements shark::AbstractClustering< InputT >.
Definition at line 88 of file HierarchicalClustering.h.
References shark::HierarchicalClustering< InputT >::mep_tree, and shark::BinaryTree< InputT >::nodes().
Referenced by main().
|
inlinevirtual |
from IParameterizable
Reimplemented from shark::IParameterizable< VectorType >.
Definition at line 123 of file HierarchicalClustering.h.
|
inlinevirtual |
from IParameterizable
Reimplemented from shark::IParameterizable< VectorType >.
Definition at line 113 of file HierarchicalClustering.h.
|
inlinevirtual |
from IParameterizable
Reimplemented from shark::IParameterizable< VectorType >.
Definition at line 118 of file HierarchicalClustering.h.
References SHARK_ASSERT.
|
protected |
binary tree
Definition at line 129 of file HierarchicalClustering.h.
Referenced by shark::HierarchicalClustering< InputT >::hardMembership(), and shark::HierarchicalClustering< InputT >::numberOfClusters().