diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-05-19 17:03:50 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-05-19 17:03:50 +0200 |
commit | 32b7faa44ef70194e0ae1c5e43948eea785f9d04 (patch) | |
tree | 97645189cccabdb58e016c3bf5f890f4e13d664f /lib/model.rb | |
parent | 30478c4dd18b56048b6e190027daef1fc6608230 (diff) |
Fixed neighbor selection
Diffstat (limited to 'lib/model.rb')
-rw-r--r-- | lib/model.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/model.rb b/lib/model.rb index 7acd8f2..998d2dc 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -216,7 +216,7 @@ module OpenTox for i in 1..modulo[0] do (i == modulo[0]) && (slack>0) ? lr_size = s.size + slack : lr_size = s.size + addon # determine fraction LOGGER.info "BLAZAR: Neighbors round #{i}: #{position} + #{lr_size}." - neighbors(s, l, position, lr_size) # get ratio fraction of larger part + neighbors_balanced(s, l, position, lr_size) # get ratio fraction of larger part prediction = eval("#{@prediction_algorithm}(@neighbors,{:similarity_algorithm => @similarity_algorithm, :p_values => @p_values})") if prediction_best.nil? || prediction[:confidence].abs > prediction_best[:confidence].abs prediction_best=prediction @@ -325,7 +325,7 @@ module OpenTox end # Find neighbors and store them as object variable - def neighbors(s=nil, l=nil, start=nil, offset=nil) + def neighbors_balanced(s, l, start, offset) @compound_features = eval("#{@feature_calculation_algorithm}(@compound,@features)") if @feature_calculation_algorithm @neighbors = [] |