-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.r
34 lines (33 loc) · 971 Bytes
/
config.r
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
# Do not comment variables, instead change their values
zero_mean = FALSE
feature_selection = FALSE
do_balance = FALSE
roc = FALSE
k_fold = FALSE
max_recipes = 500
cut_off = 0.85
num_fold = 10
dataset_file = "dataset/cleaned-dataset.json"
# Available models
# naiveBayes = naive bayes
# rpart = random forest
model = "svm"
target = "cuisine" # Possible values [continent, cuisine]
# Output filename based on config variables. Leave this at the end of config file
filename = toString(model)
if (zero_mean) {
filename = paste(filename, "zero-mean", sep = "_")
}
if (feature_selection) {
str = paste(toString(cut_off), "feat-sel", sep = "")
filename = paste(filename, str, sep = "_")
}
if (do_balance) {
str = paste(toString(max_recipes), "balanced", sep = "")
filename = paste(filename, str, sep = "_")
}
if (k_fold) {
str = paste(toString(num_fold), "-fold", sep = "")
filename = paste(filename, str, sep = "_")
}
filename = paste(filename, ".txt", sep="")