iRoCS Toolbox  1.1.0
Public Types | Public Member Functions | Static Public Member Functions
svt::LoadSaveHdf5Templ< STDATATYPE > Class Template Reference

#include <LoadSaveHdf5.hh>

Collaboration diagram for svt::LoadSaveHdf5Templ< STDATATYPE >:

Public Types

typedef STDATATYPE STDATA
 

Public Member Functions

 ~LoadSaveHdf5Templ ()
 
void checkParamsForLoadFeatureVectors (StDataCmdLine &cmdline) const
 Just accesses all parameters, that are used in loadFeatureVectors() so that they are no longer unknwon to StDataCmdLine. More...
 
bool checkParamsForLoadSubsetLabels (StDataCmdLine &cmdline) const
 checks wether the "--subset_att" parameter was given. More...
 
bool checkParamsForSaveClassificationResults (StDataCmdLine &cmdline) const
 Just accesses all parameters, that are used in saveClassificationResults() so that they are no longer unknwon to StDataASCIIFile. More...
 
void checkParamsForSaveModel (StDataCmdLine &cmdline) const
 Just accesses all parameters, that are used in saveModel() so that they are no longer unknwon to StDataASCIIFile. More...
 
template<typename FV , typename ALGORITHMS >
BasicSVMAdapter< FV, STDATA > * createSVMAndLoadModel (StDataCmdLine &cmdline) const
 create SVM from file and load Model data More...
 
template<typename FV >
void loadFeatureVectors (StDataCmdLine &cmdline, std::vector< FV > &featureVectors)
 load feature vectors More...
 
void loadSubsetLabels (StDataCmdLine &cmdline, std::vector< int > &subsetIndexByUID)
 load feature vectors More...
 
void saveClassificationResults (StDataCmdLine &cmdline, const std::vector< double > &results, const std::vector< StDataASCII > &details, bool saveDetails, std::ostream &os) const
 save classification results. More...
 
template<typename FV >
void saveModel (StDataCmdLine &cmdline, BasicSVMAdapter< FV, STDATA > *svm, int detailLevel, std::ostream &os) const
 save Model. More...
 

Static Public Member Functions

static void getParamInfosForCreateSVMAndLoadModel (std::vector< ParamInfo > &p)
 get information about the parameters, that are used in createSVMAndLoadModel(). More...
 
static void getParamInfosForLoadFeatureVectors (std::vector< ParamInfo > &p)
 get information about the parameters, that are used in loadFeatureVectors(). More...
 
static void getParamInfosForLoadSubsetLabels (std::vector< ParamInfo > &p)
 get information about the parameters, that are used in loadSubsetLabels(). More...
 
static void getParamInfosForSaveClassificationResults (std::vector< ParamInfo > &p)
 get information about the parameters, that are used in createSVMAndLoadModel(). More...
 
static void getParamInfosForSaveModel (std::vector< ParamInfo > &p)
 get information about the parameters, that are used in saveModel(). More...
 

Detailed Description

template<typename STDATATYPE>
class svt::LoadSaveHdf5Templ< STDATATYPE >

Definition at line 62 of file LoadSaveHdf5.hh.

Member Typedef Documentation

◆ STDATA

template<typename STDATATYPE >
typedef STDATATYPE svt::LoadSaveHdf5Templ< STDATATYPE >::STDATA

Definition at line 69 of file LoadSaveHdf5.hh.

Constructor & Destructor Documentation

◆ ~LoadSaveHdf5Templ()

template<typename STDATATYPE >
svt::LoadSaveHdf5Templ< STDATATYPE >::~LoadSaveHdf5Templ ( )
inline

Definition at line 66 of file LoadSaveHdf5.hh.

Member Function Documentation

◆ getParamInfosForLoadFeatureVectors()

template<typename STDATATYPE >
static void svt::LoadSaveHdf5Templ< STDATATYPE >::getParamInfosForLoadFeatureVectors ( std::vector< ParamInfo > &  p)
static

get information about the parameters, that are used in loadFeatureVectors().

The Infos are appended to the passed array

Parameters
parray of ParamInfos. The Infos will be appended to this array

◆ checkParamsForLoadFeatureVectors()

template<typename STDATATYPE >
void svt::LoadSaveHdf5Templ< STDATATYPE >::checkParamsForLoadFeatureVectors ( StDataCmdLine cmdline) const

Just accesses all parameters, that are used in loadFeatureVectors() so that they are no longer unknwon to StDataCmdLine.

Parameters
cmdlinecommand line

◆ loadFeatureVectors()

template<typename STDATATYPE >
template<typename FV >
void svt::LoadSaveHdf5Templ< STDATATYPE >::loadFeatureVectors ( StDataCmdLine cmdline,
std::vector< FV > &  featureVectors 
)

load feature vectors

Parameters
cmdlinecommand line parameters
featureVectorsthe loaded feature vectors
Exceptions
svt::LoadErrorfile could not be opened

◆ getParamInfosForLoadSubsetLabels()

template<typename STDATATYPE >
static void svt::LoadSaveHdf5Templ< STDATATYPE >::getParamInfosForLoadSubsetLabels ( std::vector< ParamInfo > &  p)
static

get information about the parameters, that are used in loadSubsetLabels().

The Infos are appended to the passed array

Parameters
parray of ParamInfos. The Infos will be appended to this array

◆ checkParamsForLoadSubsetLabels()

template<typename STDATATYPE >
bool svt::LoadSaveHdf5Templ< STDATATYPE >::checkParamsForLoadSubsetLabels ( StDataCmdLine cmdline) const

checks wether the "--subset_att" parameter was given.

Parameters
cmdlinecommand line
Returns
true: subset_att parameter was given

◆ loadSubsetLabels()

template<typename STDATATYPE >
void svt::LoadSaveHdf5Templ< STDATATYPE >::loadSubsetLabels ( StDataCmdLine cmdline,
std::vector< int > &  subsetIndexByUID 
)

load feature vectors

Parameters
cmdlinecommand line parameters
subsetIndexByUIDsubset Index by Unique ID, could be directly used for Cross-validati on
Exceptions
svt::LoadErrorfile could not be opened

◆ getParamInfosForSaveModel()

template<typename STDATATYPE >
static void svt::LoadSaveHdf5Templ< STDATATYPE >::getParamInfosForSaveModel ( std::vector< ParamInfo > &  p)
static

get information about the parameters, that are used in saveModel().

The Infos are appended to the passed array

Parameters
parray of ParamInfos. The Infos will be appended to this array

◆ checkParamsForSaveModel()

template<typename STDATATYPE >
void svt::LoadSaveHdf5Templ< STDATATYPE >::checkParamsForSaveModel ( StDataCmdLine cmdline) const

Just accesses all parameters, that are used in saveModel() so that they are no longer unknwon to StDataASCIIFile.

Parameters
cmdlinecommand line

◆ saveModel()

template<typename STDATATYPE >
template<typename FV >
void svt::LoadSaveHdf5Templ< STDATATYPE >::saveModel ( StDataCmdLine cmdline,
BasicSVMAdapter< FV, STDATA > *  svm,
int  detailLevel,
std::ostream &  os 
) const

save Model.

Parameters
cmdlinecommand line parameters
svmthe trained SVM
detailLevelwether to save additional training infos to model. 0: nothing, 1: only statistics, 2: training infos from all two-class trainings
Exceptions
svt::SaveErroroutput file could not be created

◆ getParamInfosForCreateSVMAndLoadModel()

template<typename STDATATYPE >
static void svt::LoadSaveHdf5Templ< STDATATYPE >::getParamInfosForCreateSVMAndLoadModel ( std::vector< ParamInfo > &  p)
static

get information about the parameters, that are used in createSVMAndLoadModel().

The Infos are appended to the passed array

Parameters
parray of ParamInfos. The Infos will be appended to this array

◆ createSVMAndLoadModel()

template<typename STDATATYPE >
template<typename FV , typename ALGORITHMS >
BasicSVMAdapter<FV,STDATA>* svt::LoadSaveHdf5Templ< STDATATYPE >::createSVMAndLoadModel ( StDataCmdLine cmdline) const

create SVM from file and load Model data

Parameters
cmdlinecommand line parameters
modelFileNamefile name of modelfile
svm(output)
Exceptions
svt::LoadErrorfile could not be opened
Returns
created SVM with loaded Model. The ownership of this object goes to caller. So you are responsible to delete it after usage

◆ getParamInfosForSaveClassificationResults()

template<typename STDATATYPE >
static void svt::LoadSaveHdf5Templ< STDATATYPE >::getParamInfosForSaveClassificationResults ( std::vector< ParamInfo > &  p)
static

get information about the parameters, that are used in createSVMAndLoadModel().

The Infos are appended to the passed array

Parameters
parray of ParamInfos. The Infos will be appended to this array

◆ checkParamsForSaveClassificationResults()

template<typename STDATATYPE >
bool svt::LoadSaveHdf5Templ< STDATATYPE >::checkParamsForSaveClassificationResults ( StDataCmdLine cmdline) const

Just accesses all parameters, that are used in saveClassificationResults() so that they are no longer unknwon to StDataASCIIFile.

Parameters
cmdlinecommand line

◆ saveClassificationResults()

template<typename STDATATYPE >
void svt::LoadSaveHdf5Templ< STDATATYPE >::saveClassificationResults ( StDataCmdLine cmdline,
const std::vector< double > &  results,
const std::vector< StDataASCII > &  details,
bool  saveDetails,
std::ostream &  os 
) const

save classification results.

Parameters
cmdlinethe command line
resultspredicted labels for each feature vector
detailsadditional classification details in key-value pairs for each feature vector
saveDetailswether to save the additional details in details vector
osoutput stream (usually std::cout) for additionally infos, like "saving ...", etc.

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