-
Notifications
You must be signed in to change notification settings - Fork 4
/
hp.h
70 lines (52 loc) · 1.02 KB
/
hp.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef HYPERPARAMETERS_H_
#define HYPERPARAMETERS_H_
#include <string>
using namespace std;
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstdlib>
#include <stdio.h>
#include <cmath>
using namespace std;
class Hyperparameters
{
public:
Hyperparameters();
Hyperparameters(const string& confFile){
cout << "Loading config file: " << confFile << " ... ";
ifstream in(confFile);
string dummy;
if(in.is_open()) {
in >> dummy;
in >> maxDepth;
// Number of trees
in >> dummy;
in >> numRandomTests;
in >> dummy;
in >> counterThreshold;
in >> dummy;
in >> numTrees;
in >> dummy;
in >> numEpochs;
} else {
cerr << "File not found " << endl;
exit(-1);
}
in.close();
cout << "Done." << endl;
}
// Online node
int numRandomTests;
int counterThreshold;
int maxDepth;
// Online forest
int numTrees;
int numEpochs;
// Data
string trainData;
string testData;
// Output
int verbose;
};
#endif /*HYPERPARAMETERS_H_*/