Feature Selection Toolbox FST4
UTIA · Czech Academy of Sciences
Loading...
Searching...
No Matches
FST::Model< SUBSET, DATAACCESSOR > Class Template Referenceabstract

abstract class, defines interface for data model implementations More...

#include <model.hpp>

Inheritance diagram for FST::Model< SUBSET, DATAACCESSOR >:
FST::Model_Multinomial< DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR > FST::Model_Normal< DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR >

Public Types

typedef std::shared_ptr< DATAACCESSOR > PDataAccessor
 shared pointer to the data accessor supplying training data
typedef std::shared_ptr< SUBSET > PSubset
 shared pointer to a feature subset, as consumed by narrow_to()

Public Member Functions

virtual void learn (PDataAccessor da)=0
 Fits the model's parameters from da's training data, over all its features. Concrete models may additionally offer a (da, subset) convenience overload to learn at a lower dimensionality directly - that is not part of this interface, so generic code must not assume it exists. narrow_to()/denarrow() do NOT relearn – they only change which features of an ALREADY-learned model are exposed to subsequent evaluation.
virtual void narrow_to (const PSubset sub)=0
virtual void denarrow ()=0
 Undoes narrow_to(): model access reverts to the full dimensionality it was learned at.

Detailed Description

template<class SUBSET, class DATAACCESSOR>
class FST::Model< SUBSET, DATAACCESSOR >

abstract class, defines interface for data model implementations

Note
Model is deliberately NOT derived from Clonable: a model is a plain value-like object owned by the criterion or classifier that learned it, never handed around through a Clonable interface. Owners therefore deep-copy their model by hand in their own copy-constructor (typically new Model_X(*other._model)), which is what makes clones of those owners independent.

Member Function Documentation

◆ denarrow()

template<class SUBSET, class DATAACCESSOR>
virtual void FST::Model< SUBSET, DATAACCESSOR >::denarrow ( )
pure virtual

◆ learn()

template<class SUBSET, class DATAACCESSOR>
virtual void FST::Model< SUBSET, DATAACCESSOR >::learn ( PDataAccessor da)
pure virtual

Fits the model's parameters from da's training data, over all its features. Concrete models may additionally offer a (da, subset) convenience overload to learn at a lower dimensionality directly - that is not part of this interface, so generic code must not assume it exists. narrow_to()/denarrow() do NOT relearn – they only change which features of an ALREADY-learned model are exposed to subsequent evaluation.

Implemented in FST::Model_Multinomial< DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR >, and FST::Model_Normal< DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR >.

◆ narrow_to()

template<class SUBSET, class DATAACCESSOR>
virtual void FST::Model< SUBSET, DATAACCESSOR >::narrow_to ( const PSubset sub)
pure virtual

Restricts subsequent model access to sub's selected features, without relearning (analogous to Distance::narrow_to() – see there for the _index[] mechanism concrete models typically reuse).

Implemented in FST::Model_Multinomial< DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR >, and FST::Model_Normal< DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR >.


The documentation for this class was generated from the following file:
  • /Users/psms/dev/devtest1/_src_criteria/model.hpp
Copyright © 2000–present ÚTIA, Institute of Information Theory and Automation of the Czech Academy of Sciences · Contacts · This site sets no cookies and uses no analytics.