diff options
author | am <a@b.c> | 2011-06-24 14:26:44 +0200 |
---|---|---|
committer | am <a@b.c> | 2011-06-24 14:26:44 +0200 |
commit | 6e3a1649f8649026a627e20d72c238beb18de3c4 (patch) | |
tree | a91a3330162d2311965817d9b422a430e172585e /fminer.rb | |
parent | 1222ff3e76051cd4903bfe89a3b3d8c0a7222799 (diff) |
Restored log10 behaviour to pass tests
Diffstat (limited to 'fminer.rb')
-rw-r--r-- | fminer.rb | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -160,7 +160,7 @@ post '/fminer/bbrc/?' do entry.each do |feature,values| values.each do |value| if prediction_feature.feature_type == "regression" - if (! value.nil?) && (value.to_f <= 0) + if (! value.nil?) && (value.to_f < 1) take_logs=false end end @@ -340,16 +340,16 @@ post '/fminer/last/?' do end # AM: take log if appropriate - take_logs=true - entry.each do |feature,values| - values.each do |value| - if prediction_feature.feature_type == "regression" - if (! value.nil?) && (value.to_f <= 0) - take_logs=false - end - end - end - end + #take_logs=true + #entry.each do |feature,values| + # values.each do |value| + # if prediction_feature.feature_type == "regression" + # if (! value.nil?) && (value.to_f <= 0) + # take_logs=false + # end + # end + # end + #end entry.each do |feature,values| if feature == prediction_feature.uri @@ -362,7 +362,8 @@ post '/fminer/last/?' do nr_classes[activity].nil? ? nr_classes[activity]=0 : nr_classes[activity]+=1 nr_total+=1 elsif prediction_feature.feature_type == "regression" - activity= take_logs ? Math.log10(value.to_f) : value.to_f + #activity= take_logs ? Math.log10(value.to_f) : value.to_f + activity = value.to_f end begin @@last.AddCompound(smiles,id) |