iRoCS Toolbox
1.1.0
|
#include <Model.hh>
Public Types | |
typedef FV | FV_type |
Public Member Functions | |
Model () | |
Model (int nSupportVectors) | |
Model (const Model< FV > &orig) | |
Copy contructor. More... | |
~Model () | |
double * | allAlphas () |
const double * | allAlphas () const |
FV ** | allSupportVectors () |
FV *const * | allSupportVectors () const |
double | alpha (unsigned int i) const |
void | copySVCoefsToSupportVectors () |
void | detachFromTrainingDataSet () |
void | free_memory () |
double | getTrainingInfoValue (const std::string &key) |
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, const std::string &prefix="") |
load the model data from given structured data. More... | |
template<typename STDATA > | |
void | loadParametersWithUIDs (STDATA &stData, const std::vector< FV *> &fvsByUID, const std::string &prefix="") |
(description) More... | |
Model & | operator= (const Model &orig) |
operator= More... | |
void | resize (size_t nSupportVectors) |
double | rho () const |
template<typename STDATA > | |
void | saveParameters (STDATA &stData, const std::string &prefix="") const |
save the model data to given structured data. More... | |
template<typename STDATA > | |
void | saveParametersWithUIDs (STDATA &stData, const std::string &prefix="") const |
save the model data to string-string map. More... | |
template<typename STDATA > | |
void | saveTrainingInfo (STDATA &stData, const std::string &prefix="") |
void | setRho (double rho) |
void | setSupportVector (unsigned int i, FV *fv, double alpha) |
template<typename T > | |
void | setTrainingInfoValue (const std::string &key, const T &value) |
size_t | size () const |
const FV * | supportVector (unsigned int i) const |
FV * | supportVector (unsigned int i) |
std::string | trainingInfoPlainText () |
typedef FV svt::Model< FV >::FV_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void svt::Model< FV >::free_memory | ( | ) |
Referenced by svt::Model< FV >::operator=(), and svt::Model< FV >::~Model().
void svt::Model< FV >::resize | ( | size_t | nSupportVectors | ) |
Referenced by svt::Model< FV >::Model(), and svt::Model< FV >::operator=().
|
inline |
|
inline |
|
inline |
Definition at line 203 of file Model.hh.
Referenced by svt::Model< FV >::setRho().
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 219 of file Model.hh.
Referenced by svt::Model< FV >::setSupportVector().
|
inline |
|
inline |
|
inline |
|
inline |
void svt::Model< FV >::copySVCoefsToSupportVectors | ( | ) |
Referenced by svt::Model< FV >::allAlphas().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void svt::Model< FV >::saveParameters | ( | STDATA & | stData, |
const std::string & | prefix = "" |
||
) | const |
save the model data to given structured data.
The support vectors are stored as full vectors in "SV"
Referenced by svt::Model< FV >::saveTrainingInfo().
void svt::Model< FV >::loadParameters | ( | STDATA & | stData, |
const std::string & | prefix = "" |
||
) |
load the model data from given structured data.
Use this method only if the feature vectors are stored as full vectors with key "SV". If there are only their uniqueID's in thw key "sv_uids", you must use the loadParametersWithUIDs() method instead
Referenced by svt::Model< FV >::saveTrainingInfo().
void svt::Model< FV >::saveParametersWithUIDs | ( | STDATA & | stData, |
const std::string & | prefix = "" |
||
) | const |
save the model data to string-string map.
only the uniqueID's of the support vectors are stored in "sv_uids"
Referenced by svt::Model< FV >::saveTrainingInfo().
void svt::Model< FV >::loadParametersWithUIDs | ( | STDATA & | stData, |
const std::vector< FV *> & | fvsByUID, | ||
const std::string & | prefix = "" |
||
) |
|
inline |
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
leaveOutFlagsByUID | leave out flag for each feature vector, accessed via its uniqueID (1 means leave this vector out from training) |