Linear classifier in a kernel feature space. More...
#include <shark/Models/Kernels/KernelExpansion.h>
Public Types | |
typedef AbstractKernelFunction< InputType > | KernelType |
typedef KernelExpansion< InputType > | KernelExpansionType |
Public Types inherited from shark::Classifier< KernelExpansion< InputType > > | |
typedef KernelExpansion< InputType > | DecisionFunctionType |
typedef Model::InputType | InputType |
typedef unsigned int | OutputType |
typedef Batch< InputType >::type | BatchInputType |
typedef Batch< unsignedint >::type | BatchOutputType |
typedef Model::ParameterVectorType | ParameterVectorType |
Public Types inherited from shark::AbstractModel< Model::InputType, unsigned int, Model::ParameterVectorType > | |
enum | Feature |
typedef Model::InputType | InputType |
Defines the input type of the model. | |
typedef unsigned int | OutputType |
Defines the output type of the model. | |
typedef AbstractModel< Model::InputType, unsigned int, Model::ParameterVectorType > | 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 | |
KernelClassifier () | |
KernelClassifier (KernelType *kernel) | |
KernelClassifier (KernelExpansionType const &decisionFunction) | |
std::string | name () const |
returns the name of the object | |
Public Member Functions inherited from shark::Classifier< KernelExpansion< InputType > > | |
Classifier () | |
Classifier (KernelExpansion< InputType > const &decisionFunction) | |
ParameterVectorType | parameterVector () const |
Return the parameter vector. | |
void | setParameterVector (ParameterVectorType const &newParameters) |
std::size_t | numberOfParameters () const |
Return the number of parameters. | |
Shape | inputShape () const |
Returns the expected shape of the input. | |
Shape | outputShape () const |
Returns the shape of the output. | |
RealVector const & | bias () const |
RealVector & | bias () |
KernelExpansion< InputType > const & | decisionFunction () const |
Return the decision function. | |
KernelExpansion< InputType > & | decisionFunction () |
Return the decision function. | |
void | eval (BatchInputType const &input, BatchOutputType &output) const |
void | eval (BatchInputType const &input, BatchOutputType &output, State &state) const |
void | eval (InputType const &pattern, OutputType &output) const |
Standard interface for evaluating the response of the model to a single pattern. | |
void | read (InArchive &archive) |
From ISerializable. | |
void | write (OutArchive &archive) const |
From ISerializable. | |
Public Member Functions inherited from shark::AbstractModel< Model::InputType, unsigned int, Model::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, Model::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, Model::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 () |
virtual void | setParameterVector (ParameterVectorType const &newParameters) |
Set the parameter vector. | |
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::AbstractModel< Model::InputType, unsigned int, Model::ParameterVectorType > | |
Features | m_features |
Linear classifier in a kernel feature space.
This model is a simple wrapper for the KernelExpansion calculating the arg max of the outputs of the model. This is the model used by kernel classifier models like SVMs.
Definition at line 315 of file KernelExpansion.h.
typedef KernelExpansion<InputType> shark::KernelClassifier< InputType >::KernelExpansionType |
Definition at line 317 of file KernelExpansion.h.
typedef AbstractKernelFunction<InputType> shark::KernelClassifier< InputType >::KernelType |
Definition at line 316 of file KernelExpansion.h.
|
inline |
Definition at line 319 of file KernelExpansion.h.
|
inline |
Definition at line 321 of file KernelExpansion.h.
|
inline |
Definition at line 324 of file KernelExpansion.h.
|
inlinevirtual |
returns the name of the object
Reimplemented from shark::Classifier< KernelExpansion< InputType > >.
Definition at line 328 of file KernelExpansion.h.