-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.h
57 lines (52 loc) · 1.98 KB
/
Config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include <string>
#include "Bins.h"
struct Config {
/// File path to the training data
std::string training_filename;
/// File path to the testing data
std::string testing_filename;
/// Number of training examples
int num_examples;
/// Number of features
int num_testing_examples;
/// Number of examples to scan for generating heuristic used in Sparrow
int num_features;
/// Label for positive examples
std::string positive;
/// Number of testing examples
int max_sample_size;
/// Maximum number of bins for discretizing continous feature values
int max_bin_size;
/// Minimum value of the gamma of the generated tree nodes
double min_gamma;
/// Default maximum value of the \gamma for generating tree nodes
double default_gamma;
/// Maximum number of examples to scan before shrinking the value of \gamma
int max_trials_before_shrink;
/// Minimum effective sample size for triggering resample
double min_ess;
/// Number of boosting iterations
int num_iterations;
/// Maximum number of tree leaves in each boosted tree
int max_leaves;
/// Maximum number of elements in the channel connecting scanner and sampler
int channel_size;
/// Number of examples in the sample set that needs to be loaded into memory
int buffer_size;
/// Number of examples to process in each weak rule updates
int batch_size;
/// Set to true to stop running sampler in the background of the scanner
bool serial_sampling;
/// Number of examples in a block on the stratified binary file
int num_examples_per_block;
/// File name for the stratified binary file
std::string disk_buffer_filename;
/// Number of threads for putting examples back to correct strata
int num_assigners;
/// Number of threads for sampling examples from strata
int num_samplers;
/// Flag for activating debug mode
bool debug_mode;
};
Config read_config(const std::string& filename);