From 6bde559981fa11ffd265af708956f9d4ee6c9a89 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 8 Oct 2015 10:32:31 +0200 Subject: crossvalidation plots, original classification confidence --- lib/model.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/model.rb') diff --git a/lib/model.rb b/lib/model.rb index cd88e0c..98433d0 100644 --- a/lib/model.rb +++ b/lib/model.rb @@ -48,7 +48,7 @@ module OpenTox self end - def predict object + def predict object, use_database_values=true t = Time.now at = Time.now @@ -75,7 +75,7 @@ module OpenTox compounds.each_with_index do |compound,c| t = Time.new database_activities = training_dataset.values(compound,prediction_feature) - if database_activities and !database_activities.empty? + if use_database_values and database_activities and !database_activities.empty? database_activities = database_activities.first if database_activities.size == 1 predictions << {:compound => compound, :value => database_activities, :confidence => "measured", :warning => "Compound #{compound.smiles} occurs in training dataset with activity '#{database_activities}'."} next -- cgit v1.2.3