-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbackwardSelection.R
59 lines (21 loc) · 1.05 KB
/
backwardSelection.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
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
source('autoload.R', chdir=T)
fullmodel <- lm(DEXAtotyag ~ yas + boy + kilo + cev_biceps +
cev_kalca + cev_boyun + cev_bel +
cev_uyluk + cev_baldir + cev_elblegi +
cev_kulacuzun + dkk_biceps + dkk_triceps +
dkk_sscapula + dkk_silliak + dkk_abdomen +
dkk_quadriceps + dkk_gogus, data=genderDb$`1`)
step(fullmodel, direction = "backward", trace=FALSE )
rf_groups <- lapply(genderDb, function(gdb){
fullmodel <- lm(DEXAtotyag ~ yas + boy + kilo + cev_biceps +
cev_kalca + cev_boyun + cev_bel +
cev_uyluk + cev_baldir + cev_elblegi +
cev_kulacuzun + dkk_biceps + dkk_triceps +
dkk_sscapula + dkk_silliak + dkk_abdomen +
dkk_quadriceps + dkk_gogus, data=gdb)
step(fullmodel, direction = "backward", trace=FALSE )
})
rf_groups
final <- rf_ga3$ga$final # Get features selected by GA
print(final)
save(rf_groups, file='rfGA30-100.RData')