From 9838233bbc9ac5c88875f8001ec137274b24c57a Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 17 Jul 2013 12:29:15 +0200 Subject: dataset ntriples serialisation fixed and activated --- fminer.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/fminer.rb b/fminer.rb index dd25fd2..e302bc3 100644 --- a/fminer.rb +++ b/fminer.rb @@ -126,6 +126,8 @@ module OpenTox task = OpenTox::Task.run("Mining BBRC features", uri('/fminer/bbrc')) do |task| + time = Time.now + @@bbrc.Reset if @@fminer.prediction_feature.feature_type == "regression" @@bbrc.SetRegression(true) # AM: DO NOT MOVE DOWN! Must happen before the other Set... operations! @@ -169,6 +171,10 @@ module OpenTox step_width = 80 / @@bbrc.GetNoRootNodes().to_f features_smarts = Set.new features = Array.new + + puts "Setup: #{Time.now-time}" + time = Time.now + ftime = 0 # run @@bbrc @@ -203,6 +209,7 @@ module OpenTox end end + ft = Time.now unless features_smarts.include? smarts features_smarts << smarts feature = OpenTox::Feature.find_or_create({ @@ -215,6 +222,7 @@ module OpenTox }) features << feature end + ftime += Time.now - ft id_arrs.each { |id_count_hash| id=id_count_hash.keys[0].to_i @@ -230,6 +238,10 @@ module OpenTox end # end of end # feature parsing + + puts "Fminer: #{Time.now-time} (find/create Features: #{ftime})" + time = Time.now + fminer_compounds = @@fminer.training_dataset.compounds prediction_feature_idx = @@fminer.training_dataset.features.collect{|f| f.uri}.index @@fminer.prediction_feature.uri prediction_feature_all_acts = fminer_compounds.each_with_index.collect { |c,idx| @@ -254,9 +266,14 @@ module OpenTox } } + puts "Prepare save: #{Time.now-time}" + time = Time.now feature_dataset.put + + puts "Save: #{Time.now-time}" feature_dataset.uri + end response['Content-Type'] = 'text/uri-list' halt 202,task.uri -- cgit v1.2.3