summaryrefslogtreecommitdiff
path: root/lib/algorithm.rb
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-05-16 17:28:59 +0200
committerAndreas Maunz <andreas@maunz.de>2011-05-16 17:28:59 +0200
commitb247527ced213486629add9d8b5b739620a8abff (patch)
treeab5ac2a3bd6ecce51d8433190484afc35a55233c /lib/algorithm.rb
parent456acf01da2581ff186a607722eaa21ce6d54d85 (diff)
Fixed exp
Diffstat (limited to 'lib/algorithm.rb')
-rw-r--r--lib/algorithm.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb
index 130d305..7fbe0dc 100644
--- a/lib/algorithm.rb
+++ b/lib/algorithm.rb
@@ -222,7 +222,7 @@ module OpenTox
@r.eval "sims<-as.kernelMatrix(matrix(sims,1))"
LOGGER.debug "Predicting ..."
@r.eval "p<-predict(model,sims)[1,1]"
- prediction = 10**(@r.p.to_f)
+ prediction = 10**(@r.p.to_f) if take_logs
LOGGER.debug "Prediction is: '" + prediction.to_s + "'."
@r.quit # free R
end