#include <LoadSaveASCII.hh>
|
| ~LoadSaveASCII () |
|
void | checkParamsForLoadFeatureVectors (StDataCmdLine &cmdline) const |
| Just accesses all parameters, that are used in loadFeatureVectors() so that they are no longer unknwon to StDataASCIIFile. 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) |
| 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) |
| save classification results. More...
|
|
template<typename FV > |
void | saveModel (StDataCmdLine &cmdline, BasicSVMAdapter< FV, STDATA > *svm, int detailLevel, std::ostream &os) |
| save Model. More...
|
|
Definition at line 84 of file LoadSaveASCII.hh.
◆ STDATA
◆ ~LoadSaveASCII()
svt::LoadSaveASCII::~LoadSaveASCII |
( |
| ) |
|
|
inline |
◆ getParamInfosForLoadFeatureVectors()
static void svt::LoadSaveASCII::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
-
p | array of ParamInfos. The Infos will be appended to this array |
Referenced by ~LoadSaveASCII().
◆ checkParamsForLoadFeatureVectors()
void svt::LoadSaveASCII::checkParamsForLoadFeatureVectors |
( |
StDataCmdLine & |
cmdline | ) |
const |
◆ loadFeatureVectors()
template<typename FV >
void svt::LoadSaveASCII::loadFeatureVectors |
( |
StDataCmdLine & |
cmdline, |
|
|
std::vector< FV > & |
featureVectors |
|
) |
| |
load feature vectors
- Parameters
-
cmdline | command line parameters |
featureVectors | the loaded feature vectors |
- Exceptions
-
Referenced by ~LoadSaveASCII().
◆ getParamInfosForLoadSubsetLabels()
static void svt::LoadSaveASCII::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
-
p | array of ParamInfos. The Infos will be appended to this array |
Referenced by ~LoadSaveASCII().
◆ checkParamsForLoadSubsetLabels()
bool svt::LoadSaveASCII::checkParamsForLoadSubsetLabels |
( |
StDataCmdLine & |
cmdline | ) |
const |
checks wether the "--subset_att" parameter was given.
- Parameters
-
- Returns
- true: subset_att parameter was given
Referenced by ~LoadSaveASCII().
◆ loadSubsetLabels()
void svt::LoadSaveASCII::loadSubsetLabels |
( |
StDataCmdLine & |
cmdline, |
|
|
std::vector< int > & |
subsetIndexByUID |
|
) |
| |
load feature vectors
- Parameters
-
cmdline | command line parameters |
subsetIndexByUID | subset Index by Unique ID, could be directly used for Cross-validati on |
- Exceptions
-
Referenced by ~LoadSaveASCII().
◆ getParamInfosForSaveModel()
static void svt::LoadSaveASCII::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
-
p | array of ParamInfos. The Infos will be appended to this array |
Referenced by ~LoadSaveASCII().
◆ checkParamsForSaveModel()
void svt::LoadSaveASCII::checkParamsForSaveModel |
( |
StDataCmdLine & |
cmdline | ) |
const |
◆ saveModel()
save Model.
- Parameters
-
cmdline | command line parameters |
svm | the trained SVM |
detailLevel | wether to save additional training infos to model. 0: nothing, 1: only statistics, 2: training infos from all two-class trainings |
- Exceptions
-
Referenced by ~LoadSaveASCII().
◆ getParamInfosForCreateSVMAndLoadModel()
static void svt::LoadSaveASCII::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
-
p | array of ParamInfos. The Infos will be appended to this array |
Referenced by ~LoadSaveASCII().
◆ createSVMAndLoadModel()
template<typename FV , typename ALGORITHMS >
create SVM from file and load Model data
- Parameters
-
cmdline | command line parameters |
modelFileName | file name of modelfile |
svm | (output) |
- Exceptions
-
- Returns
- created SVM with loaded Model. The ownership of this object goes to caller. So you are responsible to delete it after usage
Referenced by ~LoadSaveASCII().
◆ getParamInfosForSaveClassificationResults()
static void svt::LoadSaveASCII::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
-
p | array of ParamInfos. The Infos will be appended to this array |
Referenced by ~LoadSaveASCII().
◆ checkParamsForSaveClassificationResults()
bool svt::LoadSaveASCII::checkParamsForSaveClassificationResults |
( |
StDataCmdLine & |
cmdline | ) |
const |
◆ saveClassificationResults()
void svt::LoadSaveASCII::saveClassificationResults |
( |
StDataCmdLine & |
cmdline, |
|
|
const std::vector< double > & |
results, |
|
|
const std::vector< StDataASCII > & |
details, |
|
|
bool |
saveDetails, |
|
|
std::ostream & |
os |
|
) |
| |
save classification results.
output file name is taken from cmdline parameters. If requested, classification details are saved to the extra file <outpufilename>_details in the format "<uid>_<key> <value>" one per line, where uid is the unique id of the feature vector and key, value the given key value pair from the given details-vector
- Parameters
-
cmdline | the command line |
results | predicted labels for each feature vector |
details | additional classification details in key-value pairs for each feature vector |
saveDetails | wether to save the additional details in details vector |
os | output stream (usually std::cout) for additionally infos, like "saving ...", etc. |
Referenced by ~LoadSaveASCII().
The documentation for this class was generated from the following file: