summaryrefslogtreecommitdiff
path: root/lib/algorithm.rb
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-05-19 10:08:17 +0200
committerAndreas Maunz <andreas@maunz.de>2011-05-19 10:08:17 +0200
commitcf0fd8003c373bd9216823ff2065231696ddfbcb (patch)
tree9c00c3c3253e72fc5263693825a721b18375c6ed /lib/algorithm.rb
parent30f02ce975a48e89ce8926596d51a6d923c47fcd (diff)
Set nu to 0.5
Diffstat (limited to 'lib/algorithm.rb')
-rw-r--r--lib/algorithm.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb
index 4cb80e3..fb5fd7f 100644
--- a/lib/algorithm.rb
+++ b/lib/algorithm.rb
@@ -178,7 +178,6 @@ module OpenTox
sims = neighbors.collect{ |n| Algorithm.gauss(n[:similarity]) } # similarity values btwn q and nbors
prediction = local_svm(neighbors, acts, sims, "svr", params)
- LOGGER.debug "Prediction is: '" + prediction.to_s + "'."
prediction = (take_logs ? 10**(prediction.to_f) : prediction.to_f)
LOGGER.debug "Prediction is: '" + prediction.to_s + "'."
@@ -254,7 +253,7 @@ module OpenTox
# model + support vectors
LOGGER.debug "Creating SVM model ..."
- @r.eval "model<-ksvm(gram_matrix, y, kernel=matrix, type=\"nu-#{type}\", nu=0.8)"
+ @r.eval "model<-ksvm(gram_matrix, y, kernel=matrix, type=\"nu-#{type}\", nu=0.5)"
@r.eval "sv<-as.vector(SVindex(model))"
@r.eval "sims<-sims[sv]"
@r.eval "sims<-as.kernelMatrix(matrix(sims,1))"