summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-12-09 14:47:02 +0100
committerAndreas Maunz <andreas@maunz.de>2011-12-09 14:47:02 +0100
commitd94b03bf58f95aca9bae8a4667f3e66f11c556d8 (patch)
tree01e9eb8c73a5e2850ff3c6df3c4d98aebf40c141
parent427aff8780e2039ebe3149a8bb282315c5f0de13 (diff)
fixed max_perc_neighbors ON + weighting + weighting in leaps
-rw-r--r--lib/algorithm.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb
index 2229e75..535a70e 100644
--- a/lib/algorithm.rb
+++ b/lib/algorithm.rb
@@ -457,7 +457,7 @@ module OpenTox
begin
LOGGER.debug "Best subset..."
@r.eval 'suppressPackageStartupMessages(library("leaps"))'
- @r.eval "allss = summary( regsubsets( as.formula(fstr), data=df, nvmax=#{[ (nr_cases / 3).floor, nr_features ].min}, method=\"exhaustive\") )"
+ @r.eval "allss = summary( regsubsets( as.formula(fstr), data=df, nvmax=#{[ (nr_cases / 3).floor, nr_features ].min}, method=\"exhaustive\", weights=w) )"
@r.eval 'idx = as.vector(allss$which[which.max(allss$adjr2),])'
@r.eval 'idx[1] = T' # enforce intercept
#@r.eval 'idx = idx[2:length(idx)]' # remove intercept