Abstract model with associated clustering object. More...
#include <shark/Models/Clustering/ClusteringModel.h>
 Inheritance diagram for shark::ClusteringModel< InputT, OutputT >:
 Inheritance diagram for shark::ClusteringModel< InputT, OutputT >:| Public Types | |
| typedef AbstractClustering< InputT > | ClusteringType | 
| typedef base_type::BatchInputType | BatchInputType | 
| typedef base_type::BatchOutputType | BatchOutputType | 
|  Public Types inherited from shark::AbstractModel< InputT, OutputT > | |
| enum | Feature | 
| typedef InputT | InputType | 
| Defines the input type of the model. | |
| typedef OutputT | OutputType | 
| Defines the output type of the model. | |
| typedef AbstractModel< InputT, OutputT, RealVector > | ModelBaseType | 
| Defines the BaseType used by the model (this type). Useful for creating derived models. | |
| typedef Batch< InputType >::type | BatchInputType | 
| defines the batch type of the input type. | |
| typedef Batch< OutputType >::type | BatchOutputType | 
| defines the batch type of the output type | |
| typedef TypedFlags< Feature > | Features | 
| typedef TypedFeatureNotAvailableException< Feature > | FeatureNotAvailableException | 
|  Public Types inherited from shark::IParameterizable< VectorType > | |
| typedef VectorType | ParameterVectorType | 
| Public Member Functions | |
| 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< InputT, OutputT > | |
| 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 Shape | inputShape () const=0 | 
| Returns the expected shape of the input. | |
| virtual Shape | outputShape () const=0 | 
| Returns the shape of the output. | |
| 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 (InputType const &pattern, OutputType &output) const | 
| Standard interface for evaluating the response of the model to a single pattern. | |
| 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, RealVector &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, RealVector ¶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 () | 
| virtual std::string | name () const | 
| returns the name of the object | |
|  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 | |
| ClusteringType * | mep_clustering | 
| Clustering object, see class AbstractClustering. | |
|  Protected Attributes inherited from shark::AbstractModel< InputT, OutputT > | |
| Features | m_features | 
Abstract model with associated clustering object.
See HardClusteringModel and SoftClusteringModel for details and Clustering Algorithms for possible clusterings
Definition at line 51 of file ClusteringModel.h.
| typedef base_type::BatchInputType shark::ClusteringModel< InputT, OutputT >::BatchInputType | 
Definition at line 56 of file ClusteringModel.h.
| typedef base_type::BatchOutputType shark::ClusteringModel< InputT, OutputT >::BatchOutputType | 
Definition at line 57 of file ClusteringModel.h.
| typedef AbstractClustering<InputT> shark::ClusteringModel< InputT, OutputT >::ClusteringType | 
Definition at line 55 of file ClusteringModel.h.
| 
 | inline | 
| 
 | inlinevirtual | 
Standard interface for evaluating the response of the model to a batch of patterns.
| patterns | the inputs of the model | 
| outputs | the predictions or response of the model to every pattern | 
| state | intermediate results stored by eval which can be reused for derivative computation. | 
Implements shark::AbstractModel< InputT, OutputT >.
Definition at line 86 of file ClusteringModel.h.
References shark::ClusteringModel< InputT, OutputT >::eval().
Referenced by shark::ClusteringModel< InputT, OutputT >::eval().
| 
 | inlinevirtual | 
Redirect parameter access to the clustering object.
Reimplemented from shark::IParameterizable< VectorType >.
Definition at line 74 of file ClusteringModel.h.
References shark::ClusteringModel< InputT, OutputT >::mep_clustering, and shark::IParameterizable< VectorType >::numberOfParameters().
| 
 | inlinevirtual | 
Redirect parameter access to the clustering object.
Reimplemented from shark::IParameterizable< VectorType >.
Definition at line 66 of file ClusteringModel.h.
References shark::ClusteringModel< InputT, OutputT >::mep_clustering, and shark::IParameterizable< VectorType >::parameterVector().
| 
 | inlinevirtual | 
From ISerializable, reads a model from an archive.
Reimplemented from shark::AbstractModel< InputT, OutputT >.
Definition at line 78 of file ClusteringModel.h.
References shark::ClusteringModel< InputT, OutputT >::mep_clustering.
| 
 | inlinevirtual | 
Redirect parameter access to the clustering object.
Reimplemented from shark::IParameterizable< VectorType >.
Definition at line 70 of file ClusteringModel.h.
References shark::ClusteringModel< InputT, OutputT >::mep_clustering, and shark::IParameterizable< VectorType >::setParameterVector().
| 
 | inlinevirtual | 
From ISerializable, writes a model to an archive.
Reimplemented from shark::AbstractModel< InputT, OutputT >.
Definition at line 82 of file ClusteringModel.h.
References shark::ClusteringModel< InputT, OutputT >::mep_clustering.
| 
 | protected | 
Clustering object, see class AbstractClustering.
Definition at line 92 of file ClusteringModel.h.
Referenced by shark::ClusteringModel< InputT, OutputT >::numberOfParameters(), shark::ClusteringModel< InputT, OutputT >::parameterVector(), shark::ClusteringModel< InputT, OutputT >::read(), shark::ClusteringModel< InputT, OutputT >::setParameterVector(), and shark::ClusteringModel< InputT, OutputT >::write().