Base class for clustering. More...
#include <shark/Models/Clustering/AbstractClustering.h>
Public Types | |
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<> | |
typedef RealVector | ParameterVectorType |
Public Member Functions | |
const Features & | features () const |
virtual void | updateFeatures () |
bool | hasSoftMembershipFunction () const |
virtual std::size_t | numberOfClusters () const =0 |
return the number of clusters More... | |
virtual Shape | inputShape () const =0 |
virtual unsigned int | hardMembership (InputType const &pattern) const |
Compute best matching cluster. More... | |
virtual BatchOutputType | hardMembership (BatchInputType const &patterns) const |
Compute best matching cluster for a batch of inputs. More... | |
virtual RealVector | softMembership (InputType const &pattern) const |
Compute cluster membership function. More... | |
virtual RealMatrix | softMembership (BatchInputType const &patterns) const |
Compute cluster membership function. More... | |
void | read (InArchive &archive) |
empty default implementation of ISerializable::read More... | |
void | write (OutArchive &archive) const |
empty default implementation of ISerializable::write More... | |
Public Member Functions inherited from shark::INameable | |
virtual | ~INameable () |
virtual std::string | name () const |
returns the name of the object More... | |
Public Member Functions inherited from shark::IParameterizable<> | |
virtual | ~IParameterizable () |
virtual ParameterVectorType | parameterVector () const |
Return the parameter vector. More... | |
virtual void | setParameterVector (ParameterVectorType const &newParameters) |
Set the parameter vector. More... | |
virtual std::size_t | numberOfParameters () const |
Return the number of parameters. More... | |
Public Member Functions inherited from shark::ISerializable | |
virtual | ~ISerializable () |
Virtual d'tor. More... | |
void | load (InArchive &archive, unsigned int version) |
Versioned loading of components, calls read(...). More... | |
void | save (OutArchive &archive, unsigned int version) const |
Versioned storing of components, calls write(...). More... | |
BOOST_SERIALIZATION_SPLIT_MEMBER () | |
Protected Attributes | |
Features | m_features |
Base class for clustering.
Definition at line 92 of file AbstractClustering.h.
typedef Batch<InputType>::type shark::AbstractClustering< InputT >::BatchInputType |
Definition at line 97 of file AbstractClustering.h.
typedef Batch<OutputType>::type shark::AbstractClustering< InputT >::BatchOutputType |
Definition at line 98 of file AbstractClustering.h.
typedef TypedFeatureNotAvailableException<Feature> shark::AbstractClustering< InputT >::FeatureNotAvailableException |
Definition at line 103 of file AbstractClustering.h.
typedef TypedFlags<Feature> shark::AbstractClustering< InputT >::Features |
Definition at line 103 of file AbstractClustering.h.
typedef InputT shark::AbstractClustering< InputT >::InputType |
Definition at line 95 of file AbstractClustering.h.
typedef unsigned int shark::AbstractClustering< InputT >::OutputType |
Definition at line 96 of file AbstractClustering.h.
enum shark::AbstractClustering::Feature |
Enumerator | |
---|---|
HAS_SOFT_MEMBERSHIP |
Definition at line 100 of file AbstractClustering.h.
|
inline |
Definition at line 103 of file AbstractClustering.h.
|
inlinevirtual |
Compute best matching cluster.
Definition at line 124 of file AbstractClustering.h.
Referenced by shark::HardClusteringModel< InputT >::eval(), and shark::AbstractClustering< RealVector >::hardMembership().
|
inlinevirtual |
Compute best matching cluster for a batch of inputs.
Reimplemented in shark::HierarchicalClustering< InputT >.
Definition at line 137 of file AbstractClustering.h.
|
inline |
Tests whether the clustering can compute a (soft) member ship function, describing the membership of a sample to the different clusters.
Definition at line 108 of file AbstractClustering.h.
Referenced by shark::SoftClusteringModel< InputT >::SoftClusteringModel().
|
pure virtual |
|
pure virtual |
return the number of clusters
Implemented in shark::Centroids, and shark::HierarchicalClustering< InputT >.
Referenced by shark::AbstractClustering< RealVector >::hasSoftMembershipFunction(), shark::HardClusteringModel< InputT >::outputShape(), and shark::SoftClusteringModel< InputT >::outputShape().
|
inlinevirtual |
empty default implementation of ISerializable::read
Reimplemented from shark::ISerializable.
Definition at line 172 of file AbstractClustering.h.
|
inlinevirtual |
Compute cluster membership function.
Reimplemented in shark::Centroids.
Definition at line 157 of file AbstractClustering.h.
Referenced by shark::SoftClusteringModel< InputT >::eval(), and shark::AbstractClustering< RealVector >::hardMembership().
|
inlinevirtual |
Compute cluster membership function.
Reimplemented in shark::Centroids.
Definition at line 167 of file AbstractClustering.h.
|
inlinevirtual |
Definition at line 103 of file AbstractClustering.h.
|
inlinevirtual |
empty default implementation of ISerializable::write
Reimplemented from shark::ISerializable.
Definition at line 175 of file AbstractClustering.h.
|
protected |
Definition at line 103 of file AbstractClustering.h.
Referenced by shark::AbstractClustering< RealVector >::hasSoftMembershipFunction().