DiSMEC++
app.h
Go to the documentation of this file.
1 // Copyright (c) 2021, Aalto University, developed by Erik Schultheis
2 // All rights reserved.
3 //
4 // SPDX-License-Identifier: MIT
5 
6 #ifndef DISMEC_SRC_APP_H
7 #define DISMEC_SRC_APP_H
8 
9 #include <string>
10 #include <CLI/CLI.hpp>
11 #include "fwd.h"
12 #include "data/transform.h"
13 
14 // common code for train and prediction executables
15 namespace dismec {
17  public:
18  void setup_data_args(CLI::App& app);
19  std::shared_ptr<MultiLabelData> load(int verbose);
20  [[nodiscard]] bool augment_for_bias() const;
21  private:
23  std::string DataSetFile;
24  std::string LabelFile;
25  bool OneBasedIndex = false;
26  bool NormalizeInstances = false;
28  CLI::Option* AugmentForBias = nullptr;
29  real_t Bias = 0;
30 
31  // Feature Hashing
32  int HashBuckets = -1;
33  int HashRepeats = -1;
34  unsigned HashSeed = 42;
35  };
36 }
37 #endif //DISMEC_SRC_APP_H
std::shared_ptr< MultiLabelData > load(int verbose)
Definition: app.cpp:47
std::string DataSetFile
The file from which the dataset should be read.
Definition: app.h:23
bool augment_for_bias() const
Definition: app.cpp:102
void setup_data_args(CLI::App &app)
Definition: app.cpp:14
DatasetTransform TransformData
Definition: app.h:27
CLI::Option * AugmentForBias
Definition: app.h:28
bool NormalizeInstances
Definition: app.h:26
bool OneBasedIndex
Definition: app.h:25
std::string LabelFile
Definition: app.h:24
unsigned HashSeed
Definition: app.h:34
Forward-declares types.
Main namespace in which all types, classes, and functions are defined.
Definition: app.h:15
DatasetTransform
Definition: transform.h:37
float real_t
The default type for floating point values.
Definition: config.h:17