diff options
author | Andreas Maunz <andreas@maunz.de> | 2013-02-19 07:15:05 +0100 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2013-02-19 07:15:05 +0100 |
commit | cd19c5dc93817b384e34f5887b2243ab9efc7e3b (patch) | |
tree | bf8ac47b2e93b0d948af1fa28932fdfe40e3e2b6 | |
parent | 549c4626c9df3b7a80d4394fd39d6dc5d4c10669 (diff) |
Minfreq as float and weight >=0
-rw-r--r-- | lib/algorithm.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/algorithm.rb b/lib/algorithm.rb index 84370b0..b26b58f 100644 --- a/lib/algorithm.rb +++ b/lib/algorithm.rb @@ -92,7 +92,7 @@ module OpenTox # set minfreq directly else if OpenTox::Algorithm.numeric? params[:min_frequency] - @minfreq=params[:min_frequency].to_i + @minfreq=params[:min_frequency].to_f LOGGER.debug "min_frequency #{@minfreq}" else bad_request=true @@ -145,7 +145,7 @@ module OpenTox @smi[id] = smiles if ((not fminer_instance.nil?) and (not @weight_feature.nil?) and (@prediction_feature.feature_type == "classification")) weight=entry[@weight_feature.uri][which_row[compound]].to_f # nil.to_f = 0 - raise "weights should be positive and >=1.0 for id '#{id}' with weight '#{weight}'" unless weight >= 1.0 + raise "weight '#{weight}' should be positive for id '#{id}'" unless weight >= 0.0 fminer_instance.AddWeight(weight, id) end id += 1 |