summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavor <vorgrimmlerdavid@gmx.de>2011-12-23 14:10:53 +0100
committerdavor <vorgrimmlerdavid@gmx.de>2011-12-23 14:10:53 +0100
commita74fc0029e810d699b94e21c9fe922d66a4d5c4f (patch)
tree553d9c7f4c05da5f19dd8a77312cb37ec36d4109
parent3b74791450ecc1bd89f6ddf84fd1976403188231 (diff)
Removed nr_hits
-rw-r--r--lazar.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lazar.rb b/lazar.rb
index 89e66c6..f61be83 100644
--- a/lazar.rb
+++ b/lazar.rb
@@ -80,7 +80,7 @@ post '/lazar/?' do
}
# Regression: SVM, Substructure.match_hits
elsif prediction_feature.feature_type == "regression"
- lazar.nr_hits = true # AM: Brauchen wir die Variable noch? Kann man an feature_calculation_algorithm auch ablesen (nĂchste Zeile)
+ #lazar.nr_hits = true # AM: Brauchen wir die Variable noch? Kann man an feature_calculation_algorithm auch ablesen (nĂchste Zeile)
lazar.feature_calculation_algorithm = "Substructure.match_hits"
lazar.prediction_algorithm = "Neighbors.local_svm_regression"
end
@@ -95,13 +95,13 @@ post '/lazar/?' do
# Nr Hits
if params[:nr_hits] == "false" # if nr_hits is set optional to true/false it will return as String (but should be True/FalseClass)
- lazar.nr_hits = false
+ #lazar.nr_hits = false
lazar.feature_calculation_algorithm = "Substructure.match"
elsif params[:nr_hits] == "true"
- lazar.nr_hits = true
+ #lazar.nr_hits = true
lazar.feature_calculation_algorithm = "Substructure.match_hits"
end
- params[:nr_hits] = "true" if lazar.nr_hits
+ params[:nr_hits] = "true" if lazar.feature_calculation_algorithm = "Substructure.match_hits" #not sure if this line in needed
# Algorithm
lazar.prediction_algorithm = "Neighbors.#{params[:prediction_algorithm]}" unless params[:prediction_algorithm].nil?
@@ -163,7 +163,7 @@ post '/lazar/?' do
if training_features.features[feature]
smarts = training_features.features[feature][OT.smarts]
#lazar.fingerprints[compound] << smarts
- if params[:nr_hits]
+ if lazar.feature_calculation_algorithm == "Substructure.match_hits"
lazar.fingerprints[compound][smarts] = entry[feature].flatten.first * training_features.features[feature][OT.pValue]
else
lazar.fingerprints[compound][smarts] = 1 * training_features.features[feature][OT.pValue]