abstract class, defines interface for data model implementations More...
#include <model.hpp>
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. | |
abstract class, defines interface for data model implementations
|
pure virtual |
Undoes narrow_to(): model access reverts to the full dimensionality it was learned at.
Implemented in FST::Model_Multinomial< DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR >, and FST::Model_Normal< DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR >.
|
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 >.
|
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 >.