From 0f31c884d1bcfa448a1bf43a41d8fd6cf88bfc52 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 8 Jun 2016 18:26:07 +0200 Subject: compound tests fixed --- lib/regression.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/regression.rb') diff --git a/lib/regression.rb b/lib/regression.rb index 51317ac..d034d0b 100644 --- a/lib/regression.rb +++ b/lib/regression.rb @@ -18,7 +18,7 @@ module OpenTox {:value => prediction} end - def self.local_fingerprint_regression substance:, neighbors:, method: pls#, method_params="sigma=0.05" + def self.local_fingerprint_regression substance:, neighbors:, method: "pls" #, method_params="sigma=0.05" values = [] fingerprints = {} weights = [] @@ -55,7 +55,7 @@ module OpenTox substance_features = variables.collect{|f| substance.fingerprint.include?(f) ? "T" : "F"} prediction = r_model_prediction method, data_frame, variables, weights, substance_features if prediction.nil? or prediction[:value].nil? - prediction = local_weighted_average substance, neighbors + prediction = local_weighted_average(substance: substance, neighbors: neighbors) prediction[:warning] = "Could not create local PLS model. Using weighted average of similar substances." prediction else @@ -68,7 +68,7 @@ module OpenTox end - def self.local_physchem_regression substance:, neighbors:, method: pls + def self.local_physchem_regression substance:, neighbors:, method: "pls" activities = [] weights = [] -- cgit v1.2.3