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

#include <Model_MC_OneVsOne.hh>

Inheritance diagram for svt::Model_MC_OneVsOne< TCModel >:
Collaboration diagram for svt::Model_MC_OneVsOne< 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 triangular matrix (e.g. More...
 
unsigned int maxUniqueID () const
 
unsigned int nClasses () const
 
unsigned int nTwoClassModels () const
 
void resizeCollectedSupportVectors (unsigned int size)
 
void resizeTriangularMatrix (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 triangular matrix (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 class1, unsigned int class2)
 
const TCModel & twoClassModel (unsigned int class1, unsigned int class2) const
 
const TCModel & twoClassModel (unsigned int class1) const
 
TCModel & twoClassModel (unsigned int class1)
 

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_OneVsOne< TCModel >

Definition at line 68 of file Model_MC_OneVsOne.hh.

Member Typedef Documentation

◆ FV

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

Definition at line 74 of file Model_MC_OneVsOne.hh.

Member Function Documentation

◆ resizeTriangularMatrix()

template<typename TCModel >
void svt::Model_MC_OneVsOne< TCModel >::resizeTriangularMatrix ( unsigned int  nClasses)
inline

Definition at line 76 of file Model_MC_OneVsOne.hh.

◆ nClasses()

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

Definition at line 81 of file Model_MC_OneVsOne.hh.

◆ nTwoClassModels()

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

Definition at line 86 of file Model_MC_OneVsOne.hh.

◆ twoClassModel() [1/4]

template<typename TCModel >
TCModel& svt::Model_MC_OneVsOne< TCModel >::twoClassModel ( unsigned int  class1,
unsigned int  class2 
)
inline

Definition at line 93 of file Model_MC_OneVsOne.hh.

◆ twoClassModel() [2/4]

template<typename TCModel >
const TCModel& svt::Model_MC_OneVsOne< TCModel >::twoClassModel ( unsigned int  class1,
unsigned int  class2 
) const
inline

Definition at line 98 of file Model_MC_OneVsOne.hh.

◆ twoClassModel() [3/4]

template<typename TCModel >
const TCModel& svt::Model_MC_OneVsOne< TCModel >::twoClassModel ( unsigned int  class1) const
inline

Definition at line 103 of file Model_MC_OneVsOne.hh.

◆ twoClassModel() [4/4]

template<typename TCModel >
TCModel& svt::Model_MC_OneVsOne< TCModel >::twoClassModel ( unsigned int  class1)
inline

Definition at line 108 of file Model_MC_OneVsOne.hh.

◆ collectSupportVectorsFromTCModels() [1/2]

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

Definition at line 113 of file Model_MC_OneVsOne.hh.

◆ saveTCTrainingInfos()

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

Definition at line 120 of file Model_MC_OneVsOne.hh.

◆ saveTrainingInfoStatistics()

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

Definition at line 143 of file Model_MC_OneVsOne.hh.

◆ saveParameters()

template<typename TCModel >
template<typename STDATA >
void svt::Model_MC_OneVsOne< 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 triangular matrix (e.g.

"1vs4_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_OneVsOne< TCModel >::saveTrainingInfoStatistics().

◆ loadParameters()

template<typename TCModel >
template<typename STDATA >
void svt::Model_MC_OneVsOne< 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 triangular matrix (e.g.

"1vs4_alphas").

Parameters

Referenced by svt::Model_MC_OneVsOne< 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: