summaryrefslogtreecommitdiff
path: root/lib/algorithm.rb
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-05-26 08:38:21 +0200
committerAndreas Maunz <andreas@maunz.de>2011-05-26 08:38:21 +0200
commit77c885b7394aa11ba5e59eb60884205332efa31a (patch)
tree1993a7fdfffc85adc16910667b36f9f5eaf1aca8 /lib/algorithm.rb
parent2b12d07bec101df8c10b7ab5aff1491b0997a6c7 (diff)
7th v
Diffstat (limited to 'lib/algorithm.rb')
-rw-r--r--lib/algorithm.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb
index e089184..91e075a 100644
--- a/lib/algorithm.rb
+++ b/lib/algorithm.rb
@@ -227,6 +227,7 @@ module OpenTox
# @param [Array] props, propositionalization of neighbors and query structure e.g. [ Array_for_q, two-nested-Arrays_for_n ]
# @return [Numeric] A prediction value.
def self.local_svm(neighbors, acts, sims, type, params)
+ LOGGER.debug "Local SVM (Weighted Tanimoto Kernel)."
neighbor_matches = neighbors.collect{ |n| n[:features] } # URIs of matches
gram_matrix = [] # square matrix of similarities between neighbors; implements weighted tanimoto kernel
if neighbor_matches.size == 0
@@ -299,6 +300,7 @@ module OpenTox
# @return [Numeric] A prediction value.
def self.local_svm_prop(props, acts, type, params)
+ LOGGER.debug "Local SVM (Propositionalization / Kernlab Kernel)."
n_prop = props[0] # is a matrix, i.e. two nested Arrays.
q_prop = props[1] # is an Array.