PLSSVM - Parallel Least Squares Support Vector Machine  2.0.0
A Least Squares Support Vector Machine implementation using different backends.
parser_train.hpp
Go to the documentation of this file.
1 
12 #ifndef PLSSVM_DETAIL_CMD_PARSER_TRAIN_HPP_
13 #define PLSSVM_DETAIL_CMD_PARSER_TRAIN_HPP_
14 #pragma once
15 
16 #include "plssvm/backend_types.hpp" // plssvm::backend_type
17 #include "plssvm/backends/SYCL/implementation_type.hpp" // plssvm::sycl::implementation_type
18 #include "plssvm/backends/SYCL/kernel_invocation_type.hpp" // plssvm::sycl::kernel_invocation_type
19 #include "plssvm/default_value.hpp" // plssvm::default_value
20 #include "plssvm/parameter.hpp" // plssvm::parameter
21 #include "plssvm/target_platforms.hpp" // plssvm::target_platform
22 
23 #include <cstddef> // std::size_t
24 #include <iosfwd> // forward declare std::ostream
25 #include <string> // std::string
26 
27 namespace plssvm::detail::cmd {
28 
32 class parser_train {
33  public:
40  parser_train(int argc, char **argv);
41 
44 
49 
54 
59 
61  bool strings_as_labels{ false };
63  bool float_as_real_type{ false };
64 
66  std::string input_filename{};
68  std::string model_filename{};
69 
72 };
73 
80 std::ostream &operator<<(std::ostream &out, const parser_train &params);
81 
82 } // namespace plssvm::detail::cmd
83 
84 #endif // PLSSVM_DETAIL_CMD_PARSER_TRAIN_HPP_
Defines an enumeration holding all possible backends. Can also include backends not available on the ...
Class for encapsulating all necessary parameters for training; normally provided through command line...
Definition: parser_train.hpp:32
bool strings_as_labels
true if std::string should be used as label type instead of the default type ìnt.
Definition: parser_train.hpp:61
default_value< double > epsilon
The error tolerance parameter for the CG algorithm.
Definition: parser_train.hpp:46
bool float_as_real_type
true if float should be used as real type instead of the default type double.
Definition: parser_train.hpp:63
target_platform target
The target platform: automatic (depending on the used backend), CPUs or GPUs from NVIDIA,...
Definition: parser_train.hpp:53
std::string input_filename
The name of the data/test file to parse.
Definition: parser_train.hpp:66
sycl::implementation_type sycl_implementation_type
The SYCL implementation to use with –backend=sycl.
Definition: parser_train.hpp:58
backend_type backend
The used backend: automatic (depending on the specified target_platforms), OpenMP,...
Definition: parser_train.hpp:51
std::string performance_tracking_filename
If performance tracking has been enabled, provides the name of the file where the performance trackin...
Definition: parser_train.hpp:71
std::string model_filename
The name of the model file to write the learned support vectors to/to parse the saved model from.
Definition: parser_train.hpp:68
default_value< std::size_t > max_iter
The maximum number of iterations in the CG algorithm.
Definition: parser_train.hpp:48
plssvm::parameter csvm_params
Other base C-SVM parameters.
Definition: parser_train.hpp:43
parser_train(int argc, char **argv)
Parse the command line arguments argv using cxxopts and set the training parameters accordingly.
sycl::kernel_invocation_type sycl_kernel_invocation_type
The kernel invocation type when using SYCL as backend.
Definition: parser_train.hpp:56
Implements a class used to be able to distinguish between the default value of a variable and an assi...
Defines an enumeration holding all possible SYCL implementations.
Defines an enumeration holding all possible SYCL kernel invocation types.
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.
implementation_type
Enum class for all possible SYCL implementation types.
Definition: implementation_type.hpp:24
kernel_invocation_type
Enum class for all possible SYCL kernel invocation types.
Definition: kernel_invocation_type.hpp:23
target_platform
Enum class for all possible targets.
Definition: target_platforms.hpp:25
backend_type
Enum class for all possible backend types.
Definition: backend_types.hpp:30
Implements the parameter class encapsulating all important C-SVM parameters.
This class denotes an explicit default value initialization used to distinguish between the default v...
Definition: default_value.hpp:37
Defines an enumeration holding all possible target platforms. Can also include targets not available ...