-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
93 lines (65 loc) · 3.18 KB
/
Copy pathmain.cpp
File metadata and controls
93 lines (65 loc) · 3.18 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#include <iostream>
#include <BSplineDataset.h>
inline void appGenerationNewDatasetPersoV2() {
vector<BatchParametersBSplineDataset> batch_parameters;
batch_parameters.emplace_back(1, 8, 2000, 0.005,
0, 0, 1800, 2, 3);
BSplineDataset::genererNewDataset(batch_parameters, 4, 791450245, "data/bspline_test", true, true);
}
BatchParametersBSplineDataset interactiveBatchParameters(int n_batch) {
int noeud_min, noeud_max, dmin, dmax, size_per_batch, train_to_eval_percent;
double epsilon_u, repeat_percent, max_repeat_percent;
cout << endl << " Batch " << n_batch << " generation : - Total number of curves for each criteria? ";
cin >> size_per_batch;
cout << endl << " Batch " << n_batch << " generation : - Number of curves in the train subset for each criteria? ";
cin >> train_to_eval_percent;
cout << endl << " Batch " << n_batch << " generation : - MINIMUM number of internal knots? ";
cin >> noeud_min;
cout << endl << " Batch " << n_batch << " generation : - MAXIMUM number of internal knots? ";
cin >> noeud_max;
cout << endl << " Batch " << n_batch << " generation : - Curves MINIMUM number of dimension? ";
cin >> dmin;
cout << endl << " Batch " << n_batch << " generation : - Curves MAXIMUM number of dimension? ";
cin >> dmax;
cout << endl << " Batch " << n_batch << " generation : - Value of epsilon_u? (minimum distance between consecutive knots) ";
cin >> epsilon_u;
cout << endl << " Batch " << n_batch << " generation : - Percentages of curves with knot repetition? ";
cin >> repeat_percent;
cout << endl << " Batch " << n_batch << " generation : - Maximum percentage of repeated knots? ";
cin >> max_repeat_percent;
return {noeud_min, noeud_max, size_per_batch, epsilon_u,
repeat_percent, max_repeat_percent,
train_to_eval_percent, dmin, dmax};
}
void interactiveDatasetGeneration() {
vector<BatchParametersBSplineDataset> batch_parameters;
char rep;
int batch_number = 1, k, seed;
string folder;
cout << endl << "Dataset generation : Destination folder (enter NO to not register on disk) ";
cin >> folder;
bool save_on_disk = folder != "NO";
cout << endl << "Dataset generation : Order k of curves? ";
cin >> k;
cout << endl << "Dataset generation : Random seed? ";
cin >> seed;
cout << endl << "Dataset generation : Display curves? (Y/N) ";
cin >> rep;
bool display = rep == 'Y' || rep == 'y';
do {
batch_parameters.emplace_back(interactiveBatchParameters(batch_number));
batch_number ++;
cout << endl << "Dataset generation : Add another batch? (Y/N) ";
cin >> rep;
} while (rep == 'Y' || rep == 'y');
cout << endl << endl << "Dataset generation : Confirm creation (Y/N) ";
cin >> rep;
if (rep == 'Y' || rep == 'y') {
cout << endl << " GENERATING DATASET" << endl;
BSplineDataset::genererNewDataset(batch_parameters, k, seed, folder, display, save_on_disk);
}
}
int main() {
interactiveDatasetGeneration();
return 0;
}