12 #ifndef PLSSVM_DETAIL_CMD_DATA_SET_VARIANTS_HPP_
13 #define PLSSVM_DETAIL_CMD_DATA_SET_VARIANTS_HPP_
42 template <typename real_type, typename label_type = typename data_set<real_type>::label_type>
53 template <typename real_type, typename label_type = typename data_set<real_type>::label_type>
64 template <typename real_type, typename label_type = typename data_set<real_type>::label_type>
79 template <
typename cmd_parser_type>
81 if (cmd_parser.float_as_real_type && cmd_parser.strings_as_labels) {
82 return data_set_factory_impl<float, std::string>(cmd_parser);
83 }
else if (cmd_parser.float_as_real_type && !cmd_parser.strings_as_labels) {
84 return data_set_factory_impl<float>(cmd_parser);
85 }
else if (!cmd_parser.float_as_real_type && cmd_parser.strings_as_labels) {
86 return data_set_factory_impl<double, std::string>(cmd_parser);
88 return data_set_factory_impl<double>(cmd_parser);
Encapsulate all necessary data that is needed for training or predicting using an SVM.
Definition: data_set.hpp:69
Class for encapsulating all necessary parameters for prediction; normally provided through command li...
Definition: parser_predict.hpp:28
std::string input_filename
The name of the data file to predict.
Definition: parser_predict.hpp:52
Class for encapsulating all necessary parameters for scaling a data set; normally provided through co...
Definition: parser_scale.hpp:26
double lower
The lower bound of the scaled data values.
Definition: parser_scale.hpp:37
std::string input_filename
The name of the data file to scale.
Definition: parser_scale.hpp:49
std::string restore_filename
The name of the file from which the scaling factors should be restored.
Definition: parser_scale.hpp:55
double upper
The upper bound of the scaled data values.
Definition: parser_scale.hpp:39
Class for encapsulating all necessary parameters for training; normally provided through command line...
Definition: parser_train.hpp:32
std::string input_filename
The name of the data/test file to parse.
Definition: parser_train.hpp:66
Implements a data set class encapsulating all data points, features, and potential labels.
Namespace containing implementation details for the command line interface functionality....
Definition: core.hpp:46
data_set_variants data_set_factory(const cmd_parser_type &cmd_parser)
Based on the provided command line cmd_parser, return the correct plssvm::data_set type.
Definition: data_set_variants.hpp:80
std::variant< plssvm::data_set< float, int >, plssvm::data_set< float, std::string >, plssvm::data_set< double, int >, plssvm::data_set< double, std::string > > data_set_variants
Four different type combinations are allowed in the command line invocation: float + int,...
Definition: data_set_variants.hpp:32
data_set_variants data_set_factory_impl(const cmd::parser_train &cmd_parser)
Return the correct data set type based on the plssvm::detail::cmd::parser_train command line options.
Definition: data_set_variants.hpp:43
Implements a class encapsulating all necessary parameters for predicting using the C-SVM possibly pro...
Implements a class encapsulating all necessary parameters for scaling a data set possibly provided th...
Implements a class encapsulating all necessary parameters for training the C-SVM possibly provided th...