@@ -10,6 +10,7 @@ forward_selection_byrank <- setClass(
10
10
params.min_no_vars = " numeric" ,
11
11
params.max_no_vars = " numeric" ,
12
12
params.step_size = " numeric" ,
13
+ params.factor_name = ' character' ,
13
14
outputs.metric = " data.frame" ,
14
15
outputs.results = ' data.frame' ,
15
16
outputs.chosen_vars = ' numeric' ,
@@ -46,7 +47,7 @@ setMethod(f="run",
46
47
searchlist = seq(min_vars ,max_vars ,by = step_size )
47
48
n = length(searchlist )
48
49
49
- all_results = data.frame (' actual' = rep(dataset.sample_meta(D )[,1 ],n ),' predicted' = rep(dataset.sample_meta(D )[,1 ],n ),' no_features' = 0 )
50
+ all_results = data.frame (' actual' = rep(dataset.sample_meta(D )[,I $ factor_name ],n ),' predicted' = rep(dataset.sample_meta(D )[,I $ factor_name ],n ),' no_features' = 0 )
50
51
51
52
counter = 1
52
53
for (i in searchlist )
@@ -56,7 +57,7 @@ setMethod(f="run",
56
57
Di = D
57
58
dataset.data(Di )= Xi
58
59
if (is(WF ,' model_OR_model.seq' )) {
59
- perm_results = data.frame (' actual' = dataset.sample_meta(D )[,1 ],' predicted' = dataset.sample_meta(D )[,1 ],' no_features' = searchlist [i ])
60
+ perm_results = data.frame (' actual' = dataset.sample_meta(D )[,I $ factor_name ],' predicted' = dataset.sample_meta(D )[,I $ factor_name ],' no_features' = searchlist [i ])
60
61
# train the workflow
61
62
WF = model.train(WF ,Di )
62
63
# apply the workflow
0 commit comments