iRoCS Toolbox  1.1.0
Public Types | Public Member Functions | Protected Member Functions
svt::Model_MC_OneVsRest< TCModel > Class Template Reference

#include <Model_MC_OneVsRest.hh>

Inheritance diagram for svt::Model_MC_OneVsRest< TCModel >:
Collaboration diagram for svt::Model_MC_OneVsRest< TCModel >:

Public Types

typedef TCModel::FV_type FV
 

Public Member Functions

double classIndexToLabel (unsigned int classIndex) const
 
const std::vector< FV * > & collectedSupportVectors () const
 
void collectSupportVectorsFromTCModels ()
 
void freeCollectedSupportVectors ()
 
std::vector< FV * > getSupportVectors () const
 
bool isModelAffectedByLeftOutVectors (const std::vector< char > &leaveOutFlagsByUID) const
 check, if this model is affected by specified left out vectors, which means, that it needs to be retrained, if these vectors are left out from the training data set More...
 
template<typename STDATA >
void loadParameters (STDATA &stData)
 load all data from two-class models to Map, where the keys of each model are prefixed by its position in the models vector (e.g. More...
 
unsigned int maxUniqueID () const
 
unsigned int nClasses () const
 
unsigned int nTwoClassModels () const
 
void resizeCollectedSupportVectors (unsigned int size)
 
void resizeModelsVector (unsigned int nClasses)
 
template<typename STDATA >
void saveParameters (STDATA &stData) const
 save all data from two-class models to Map, where the keys of each model will be prefixed by its position in the models vector (e.g. More...
 
template<typename STDATA >
void saveTCTrainingInfos (STDATA &statistics)
 
template<typename STDATA >
void saveTrainingInfoStatistics (STDATA &statistics)
 
void setClassIndizesToLabels (const std::vector< double > &v)
 
TCModel & twoClassModel (unsigned int classIndex)
 
const TCModel & twoClassModel (unsigned int classIndex) const
 

Protected Member Functions

template<typename ForwardIter , typename STDATA >
void calcTrainingStatisticsFromTCModels (const ForwardIter &modelsBegin, const ForwardIter &modelsEnd, STDATA &statistics)
 
template<typename ForwardIter >
void collectSupportVectorsFromTCModels (const ForwardIter &modelsBegin, const ForwardIter &modelsEnd)
 
template<typename STDATA >
void loadSupportVectorsAndClassLabels (STDATA &stData)
 
template<typename STDATA >
void saveSupportVectorsAndClassLabels (STDATA &stData) const
 

Detailed Description

template<typename TCModel>
class svt::Model_MC_OneVsRest< TCModel >

Definition at line 67 of file Model_MC_OneVsRest.hh.

Member Typedef Documentation

◆ FV

template<typename TCModel >
typedef TCModel::FV_type svt::Model_MC_OneVsRest< TCModel >::FV

Definition at line 73 of file Model_MC_OneVsRest.hh.

Member Function Documentation

◆ resizeModelsVector()

template<typename TCModel >
void svt::Model_MC_OneVsRest< TCModel >::resizeModelsVector ( unsigned int  nClasses)
inline

Definition at line 75 of file Model_MC_OneVsRest.hh.

◆ nClasses()

template<typename TCModel >
unsigned int svt::Model_MC_OneVsRest< TCModel >::nClasses ( ) const
inline

Definition at line 80 of file Model_MC_OneVsRest.hh.

◆ nTwoClassModels()

template<typename TCModel >
unsigned int svt::Model_MC_OneVsRest< TCModel >::nTwoClassModels ( ) const
inline

Definition at line 85 of file Model_MC_OneVsRest.hh.

◆ twoClassModel() [1/2]

template<typename TCModel >
TCModel& svt::Model_MC_OneVsRest< TCModel >::twoClassModel ( unsigned int  classIndex)
inline

Definition at line 90 of file Model_MC_OneVsRest.hh.

◆ twoClassModel() [2/2]

template<typename TCModel >
const TCModel& svt::Model_MC_OneVsRest< TCModel >::twoClassModel ( unsigned int  classIndex) const
inline

Definition at line 95 of file Model_MC_OneVsRest.hh.

◆ collectSupportVectorsFromTCModels() [1/2]

template<typename TCModel >
void svt::Model_MC_OneVsRest< TCModel >::collectSupportVectorsFromTCModels ( )
inline

Definition at line 100 of file Model_MC_OneVsRest.hh.

◆ saveTCTrainingInfos()

template<typename TCModel >
template<typename STDATA >
void svt::Model_MC_OneVsRest< TCModel >::saveTCTrainingInfos ( STDATA &  statistics)
inline

Definition at line 107 of file Model_MC_OneVsRest.hh.

◆ saveTrainingInfoStatistics()

template<typename TCModel >
template<typename STDATA >
void svt::Model_MC_OneVsRest< TCModel >::saveTrainingInfoStatistics ( STDATA &  statistics)
inline

Definition at line 126 of file Model_MC_OneVsRest.hh.

◆ saveParameters()

template<typename TCModel >
template<typename STDATA >
void svt::Model_MC_OneVsRest< TCModel >::saveParameters ( STDATA &  stData) const

save all data from two-class models to Map, where the keys of each model will be prefixed by its position in the models vector (e.g.

"2vsRest_alphas"). The support vectors in each model are referenced by their uniqueID, and a list of all used feature vectors is stored with the key "sv_values"

Parameters

Referenced by svt::Model_MC_OneVsRest< TCModel >::saveTrainingInfoStatistics().

◆ loadParameters()

template<typename TCModel >
template<typename STDATA >
void svt::Model_MC_OneVsRest< TCModel >::loadParameters ( STDATA &  stData)

load all data from two-class models to Map, where the keys of each model are prefixed by its position in the models vector (e.g.

"2vsRest_alphas").

Parameters

Referenced by svt::Model_MC_OneVsRest< TCModel >::saveTrainingInfoStatistics().

◆ resizeCollectedSupportVectors()

template<typename TCModel>
void svt::Model_MC< TCModel >::resizeCollectedSupportVectors ( unsigned int  size)
inlineinherited

Definition at line 102 of file Model_MC.hh.

◆ freeCollectedSupportVectors()

template<typename TCModel>
void svt::Model_MC< TCModel >::freeCollectedSupportVectors ( )
inlineinherited

◆ collectedSupportVectors()

template<typename TCModel>
const std::vector<FV*>& svt::Model_MC< TCModel >::collectedSupportVectors ( ) const
inlineinherited

Definition at line 128 of file Model_MC.hh.

◆ maxUniqueID()

template<typename TCModel>
unsigned int svt::Model_MC< TCModel >::maxUniqueID ( ) const
inlineinherited

Definition at line 135 of file Model_MC.hh.

◆ setClassIndizesToLabels()

template<typename TCModel>
void svt::Model_MC< TCModel >::setClassIndizesToLabels ( const std::vector< double > &  v)
inlineinherited

Definition at line 140 of file Model_MC.hh.

◆ classIndexToLabel()

template<typename TCModel>
double svt::Model_MC< TCModel >::classIndexToLabel ( unsigned int  classIndex) const
inlineinherited

◆ isModelAffectedByLeftOutVectors()

template<typename TCModel>
bool svt::Model_MC< TCModel >::isModelAffectedByLeftOutVectors ( const std::vector< char > &  leaveOutFlagsByUID) const
inlineinherited

check, if this model is affected by specified left out vectors, which means, that it needs to be retrained, if these vectors are left out from the training data set

Parameters
leaveOutFlagsByUIDleave out flag for each feature vector, accessed via its uniqueID (true means leave this vector out from training)
Returns
true or false

Definition at line 164 of file Model_MC.hh.

◆ getSupportVectors()

template<typename TCModel>
std::vector<FV*> svt::Model_MC< TCModel >::getSupportVectors ( ) const
inlineinherited

Definition at line 178 of file Model_MC.hh.

◆ collectSupportVectorsFromTCModels() [2/2]

template<typename TCModel>
template<typename ForwardIter >
void svt::Model_MC< TCModel >::collectSupportVectorsFromTCModels ( const ForwardIter &  modelsBegin,
const ForwardIter &  modelsEnd 
)
protectedinherited

◆ saveSupportVectorsAndClassLabels()

template<typename TCModel>
template<typename STDATA >
void svt::Model_MC< TCModel >::saveSupportVectorsAndClassLabels ( STDATA &  stData) const
protectedinherited

◆ loadSupportVectorsAndClassLabels()

template<typename TCModel>
template<typename STDATA >
void svt::Model_MC< TCModel >::loadSupportVectorsAndClassLabels ( STDATA &  stData)
protectedinherited

◆ calcTrainingStatisticsFromTCModels()

template<typename TCModel>
template<typename ForwardIter , typename STDATA >
void svt::Model_MC< TCModel >::calcTrainingStatisticsFromTCModels ( const ForwardIter &  modelsBegin,
const ForwardIter &  modelsEnd,
STDATA &  statistics 
)
protectedinherited

The documentation for this class was generated from the following file: