Implements individual Mutual Information based on multinomial model to serve as feature selection criterion in Best Individual Feature setting (feature ranking).
More...
|
|
typedef Criterion_Multinomial< RETURNTYPE, DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR > | parent |
| | base class: the multinomial-model learning/interface skeleton
|
|
typedef Clonable_Impl< Criterion_Multinomial_MI, parent > | parent_impl |
| | implements clone(); sharing/stateless_clone throw in Criterion
|
|
typedef std::shared_ptr< DATAACCESSOR > | PDataAccessor |
| | shared pointer to the data accessor the model is learned from
|
|
typedef std::shared_ptr< SUBSET > | PSubset |
| | shared pointer to the feature subset being evaluated
|
|
typedef std::shared_ptr< DATAACCESSOR > | PDataAccessor |
| | shared pointer to the data accessor the model is learned from
|
|
typedef std::shared_ptr< SUBSET > | PSubset |
| | shared pointer to the feature subset being evaluated
|
|
typedef std::shared_ptr< SUBSET > | PSubset |
| | shared pointer to the feature subset being evaluated
|
|
typedef std::shared_ptr< SUBSET > | PSubset |
| | shared pointer to the feature subset being evaluated
|
|
| virtual bool | evaluate (RETURNTYPE &result, const PSubset sub) override |
| | Scores sub as the sum of per-feature individual Mutual Information values over its selected features.
|
| virtual bool | initialize (PDataAccessor da) override |
| | learns the model (parent::initialize()) and resets the lazily-computed individual-MI cache
|
| virtual std::ostream & | print (std::ostream &os) const override |
| | writes a human-readable identification of the object; base default writes nothing
|
| Criterion_Multinomial< RETURNTYPE, DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR > * | clone () const override |
| | dispatches to the DEEP_KIND mechanism (default CLONE_DEEP: Derived's copy-constructor)
|
| Criterion_Multinomial< RETURNTYPE, DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR > * | sharing_clone () const override |
| | dispatches to the SHARING_KIND mechanism (default CLONE_INHERIT: defers to Base, which throws by family convention)
|
| Criterion_Multinomial< RETURNTYPE, DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR > * | stateless_clone () const override |
| | dispatches to the STATELESS_KIND mechanism (default CLONE_INHERIT: defers to Base, which throws by family convention)
|
| virtual bool | is_monotonic () const override |
|
DIMTYPE | get_n () const |
| | the full (raw, unnarrowed) feature count the model was learned for
|
|
DIMTYPE | get_d () const |
| | the currently active (narrowed) feature count
|
| Criterion * | sharing_clone () const override |
| Criterion * | stateless_clone () const override |
| bool | is_clone () const |
|
bool | is_sharing () const |
| | true if this instance is a sharing_clone() result (referencing, not owning, the source's structures)
|
|
bool | is_sharing_clone () const |
| | true if this instance is BOTH a clone and sharing – i.e. specifically a sharing_clone() result, not a clone()/stateless_clone() one
|
|
|
| Criterion_Multinomial (const Criterion_Multinomial &cm) |
| | Copy-constructor; deep-copies _model.
|
|
void | set_cloned (const bool cloned=true) |
| | marks/unmarks this instance as a clone; call from clone()/stateless_clone() overrides (Clonable_Impl does this automatically)
|
|
void | set_sharing (const bool sharing=true) |
| | marks/unmarks this instance as sharing (see is_sharing())
|
|
void | set_sharing_cloned (const bool cloned=true, const bool sharing=true) |
| | sets both flags at once; call from sharing_clone() overrides (Clonable_Impl does this automatically)
|
|
std::unique_ptr< Model_Multinomial< DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR > > | _model |
| | the learned per-class multinomial (term-probability) model
|
template<class RETURNTYPE, typename DATATYPE, typename REALTYPE, typename IDXTYPE, typename DIMTYPE, class SUBSET, class DATAACCESSOR>
class FST::Criterion_Multinomial_MI< RETURNTYPE, DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR >
Implements individual Mutual Information based on multinomial model to serve as feature selection criterion in Best Individual Feature setting (feature ranking).
- Note
- Subset value = SUM of the per-feature individual MI values (on a singleton this is the individual MI itself). The sum is the BIF-consistent extension - the top-d ranking maximizes it - and is monotonic, but it is NOT a joint dependence measure: feature redundancy is invisible to it. Intended for ranking use (--search bif and --criterion multinom-mi in the fst4 CLI).
template<class RETURNTYPE, typename DATATYPE, typename REALTYPE, typename IDXTYPE, typename DIMTYPE, class SUBSET, class DATAACCESSOR>
template<class RETURNTYPE, typename DATATYPE, typename REALTYPE, typename IDXTYPE, typename DIMTYPE, class SUBSET, class DATAACCESSOR>
template<class RETURNTYPE, typename DATATYPE, typename REALTYPE, typename IDXTYPE, typename DIMTYPE, class SUBSET, class DATAACCESSOR>
| virtual std::ostream & FST::Criterion_Multinomial_MI< RETURNTYPE, DATATYPE, REALTYPE, IDXTYPE, DIMTYPE, SUBSET, DATAACCESSOR >::print |
( |
std::ostream & | os | ) |
const |
|
inlineoverridevirtual |
writes a human-readable identification of the object; base default writes nothing
Reimplemented from FST::Clonable.