PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
parser_scale.hpp
Go to the documentation of this file.
1 
12 #ifndef PLSSVM_DETAIL_CMD_PARSER_SCALE_HPP_
13 #define PLSSVM_DETAIL_CMD_PARSER_SCALE_HPP_
14 #pragma once
15 
16 #include "plssvm/file_format_types.hpp" // plssvm::file_format_type
17 
18 #include <iosfwd> // forward declare std::ostream
19 #include <string> // std::string
20 
21 namespace plssvm::detail::cmd {
22 
26 class parser_scale {
27  public:
34  parser_scale(int argc, char **argv);
35 
37  double lower{ -1.0 };
39  double upper{ +1.0 };
42 
44  bool strings_as_labels{ false };
46  bool float_as_real_type{ false };
47 
49  std::string input_filename{};
51  std::string scaled_filename{};
53  std::string save_filename{};
55  std::string restore_filename{};
56 
59 };
60 
67 std::ostream &operator<<(std::ostream &out, const parser_scale &params);
68 
69 } // namespace plssvm::detail::cmd
70 
71 #endif // PLSSVM_DETAIL_CMD_PARSER_SCALE_HPP_
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 save_filename
The name of the file where the scaling factors are saved.
Definition: parser_scale.hpp:53
std::string restore_filename
The name of the file from which the scaling factors should be restored.
Definition: parser_scale.hpp:55
parser_scale(int argc, char **argv)
Parse the command line arguments argv using cxxopts and set the scale parameters accordingly.
std::string performance_tracking_filename
If performance tracking has been enabled, provides the name of the file where the performance trackin...
Definition: parser_scale.hpp:58
double upper
The upper bound of the scaled data values.
Definition: parser_scale.hpp:39
bool float_as_real_type
true if float should be used as real type instead of the default type double.
Definition: parser_scale.hpp:46
std::string scaled_filename
The name of the scaled data file to save.
Definition: parser_scale.hpp:51
file_format_type format
The file type (currently either LIBSVM or ARFF) to which the scaled data should be written to.
Definition: parser_scale.hpp:41
bool strings_as_labels
true if std::string should be used as label type instead of the default type ìnt.
Definition: parser_scale.hpp:44
Defines an enumeration holding all supported file formats.
Namespace containing implementation details for the command line interface functionality....
Definition: core.hpp:46
std::ostream & operator<<(std::ostream &out, const parser_predict &params)
Output all predict parameters encapsulated by params to the given output-stream out.
file_format_type
Enum class for all supported file types.
Definition: file_format_types.hpp:23