Model for "hard" clustering. More...
#include <shark/Models/Clustering/HardClusteringModel.h>
Inheritance diagram for shark::HardClusteringModel< InputT >:Public Member Functions | |
| HardClusteringModel (ClusteringType *clustering) | |
| Constructor. | |
| std::string | name () const |
| From INameable: return the class name. | |
| Shape | inputShape () const |
| Returns the expected shape of the input. | |
| Shape | outputShape () const |
| Returns the shape of the output. | |
| void | eval (InputType const &pattern, OutputType &output) const |
| Compute best matching cluster. | |
| void | eval (BatchInputType const &patterns, BatchOutputType &outputs) const |
| Compute best matching cluster for a batch of inputs. | |
Public Member Functions inherited from shark::ClusteringModel< InputT, unsigned int > | |
| ClusteringModel (ClusteringType *clustering) | |
| Constructor. | |
| RealVector | parameterVector () const |
| Redirect parameter access to the clustering object. | |
| void | setParameterVector (RealVector const &newParameters) |
| Redirect parameter access to the clustering object. | |
| std::size_t | numberOfParameters () const |
| Redirect parameter access to the clustering object. | |
| void | read (InArchive &archive) |
| From ISerializable, reads a model from an archive. | |
| void | write (OutArchive &archive) const |
| From ISerializable, writes a model to an archive. | |
| void | eval (BatchInputType const &patterns, BatchOutputType &outputs, State &state) const |
| Standard interface for evaluating the response of the model to a batch of patterns. | |
Public Member Functions inherited from shark::AbstractModel< InputTypeT, OutputTypeT, ParameterVectorType > | |
| AbstractModel () | |
| virtual | ~AbstractModel () |
| const Features & | features () const |
| virtual void | updateFeatures () |
| bool | hasFirstParameterDerivative () const |
| Returns true when the first parameter derivative is implemented. | |
| bool | hasFirstInputDerivative () const |
| Returns true when the first input derivative is implemented. | |
| virtual boost::shared_ptr< State > | createState () const |
| Creates an internal state of the model. | |
| virtual void | eval (BatchInputType const &patterns, BatchOutputType &outputs) const |
| Standard interface for evaluating the response of the model to a batch of patterns. | |
| virtual void | eval (BatchInputType const &patterns, BatchOutputType &outputs, State &state) const =0 |
| Standard interface for evaluating the response of the model to a batch of patterns. | |
| Data< OutputType > | operator() (Data< InputType > const &patterns) const |
| Model evaluation as an operator for a whole dataset. This is a convenience function. | |
| OutputType | operator() (InputType const &pattern) const |
| Model evaluation as an operator for a single pattern. This is a convenience function. | |
| BatchOutputType | operator() (BatchInputType const &patterns) const |
| Model evaluation as an operator for a single pattern. This is a convenience function. | |
| virtual void | weightedParameterDerivative (BatchInputType const &pattern, BatchOutputType const &outputs, BatchOutputType const &coefficients, State const &state, ParameterVectorType &derivative) const |
| calculates the weighted sum of derivatives w.r.t the parameters. | |
| virtual void | weightedInputDerivative (BatchInputType const &pattern, BatchOutputType const &outputs, BatchOutputType const &coefficients, State const &state, BatchInputType &derivative) const |
| calculates the weighted sum of derivatives w.r.t the inputs | |
| virtual void | weightedDerivatives (BatchInputType const &patterns, BatchOutputType const &outputs, BatchOutputType const &coefficients, State const &state, ParameterVectorType ¶meterDerivative, BatchInputType &inputDerivative) const |
| calculates weighted input and parameter derivative at the same time | |
Public Member Functions inherited from shark::IParameterizable< VectorType > | |
| virtual | ~IParameterizable () |
Public Member Functions inherited from shark::INameable | |
| virtual | ~INameable () |
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 () | |
Additional Inherited Members | |
Protected Attributes inherited from shark::ClusteringModel< InputT, unsigned int > | |
| ClusteringType * | mep_clustering |
| Clustering object, see class AbstractClustering. | |
Protected Attributes inherited from shark::AbstractModel< InputTypeT, OutputTypeT, ParameterVectorType > | |
| Features | m_features |
Model for "hard" clustering.
Definition at line 55 of file HardClusteringModel.h.
| typedef base_type::BatchInputType shark::HardClusteringModel< InputT >::BatchInputType |
Definition at line 60 of file HardClusteringModel.h.
| typedef base_type::BatchOutputType shark::HardClusteringModel< InputT >::BatchOutputType |
Definition at line 61 of file HardClusteringModel.h.
| typedef base_type::InputType shark::HardClusteringModel< InputT >::InputType |
Definition at line 62 of file HardClusteringModel.h.
| typedef base_type::OutputType shark::HardClusteringModel< InputT >::OutputType |
Definition at line 63 of file HardClusteringModel.h.
|
inline |
Constructor.
Definition at line 67 of file HardClusteringModel.h.
|
inline |
Compute best matching cluster for a batch of inputs.
Definition at line 96 of file HardClusteringModel.h.
References shark::AbstractClustering< InputT >::hardMembership(), and shark::ClusteringModel< InputT, unsigned int >::mep_clustering.
|
inlinevirtual |
Compute best matching cluster.
Reimplemented from shark::AbstractModel< InputTypeT, OutputTypeT, ParameterVectorType >.
Definition at line 88 of file HardClusteringModel.h.
References shark::AbstractClustering< InputT >::hardMembership(), and shark::ClusteringModel< InputT, unsigned int >::mep_clustering.
|
inlinevirtual |
Returns the expected shape of the input.
Implements shark::AbstractModel< InputTypeT, OutputTypeT, ParameterVectorType >.
Definition at line 77 of file HardClusteringModel.h.
References shark::AbstractClustering< InputT >::inputShape(), and shark::ClusteringModel< InputT, unsigned int >::mep_clustering.
|
inlinevirtual |
From INameable: return the class name.
Reimplemented from shark::INameable.
Definition at line 72 of file HardClusteringModel.h.
|
inlinevirtual |
Returns the shape of the output.
Implements shark::AbstractModel< InputTypeT, OutputTypeT, ParameterVectorType >.
Definition at line 80 of file HardClusteringModel.h.
References shark::ClusteringModel< InputT, unsigned int >::mep_clustering, and shark::AbstractClustering< InputT >::numberOfClusters().