-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclassification-up.R
More file actions
34 lines (26 loc) · 902 Bytes
/
classification-up.R
File metadata and controls
34 lines (26 loc) · 902 Bytes
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
################################################################
# Mineria de Datos: Preprocesamiento y Clasificacion #
# #
# FILE: classification-up.R #
# #
# (C) Cristian González Guerrero #
################################################################
# Use the same seed to ensure same cross-validation splits
ctrl$seeds = fit$original$control$seeds
# Build up-sampled model
ctrl$sampling = "up"
fit$up = caret::train(
class ~ .,
data = training.set,
method = class.opts$method,
# verbose = FALSE,
metric = "ROC",
trControl = ctrl
)
print(
fit$up %>%
test_roc(data = test.set) %>%
auc()
)
end.time = Sys.time()
save.image(paste0(class.opts$method, "-up", ".RData"))