summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrautenberg <rautenberg@in-silico.ch>2016-09-28 18:12:39 +0200
committerrautenberg <rautenberg@in-silico.ch>2016-09-28 18:12:39 +0200
commit847ac38bfdd0960efcbc7fea07ed0076883300c4 (patch)
treec47975db16bd6ea52bd44387b26f6e101ffe0923
parent19cec3d1d971c2028c57fdfe883820968db3fb50 (diff)
add more algoritm information to 4.2, 4.4
-rw-r--r--lib/report.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/report.rb b/lib/report.rb
index eaffc35..d849907 100644
--- a/lib/report.rb
+++ b/lib/report.rb
@@ -78,12 +78,15 @@ get "/report/:id/?" do
report.value "endpoint_units", "#{prediction_model.unit}"
model_type = model.class.to_s.gsub('OpenTox::Model::Lazar','')
+
# Type of model 4.1
report.value "algorithm_type", "#{model_type}"
# Explicit algorithm 4.2
- report.change_catalog :algorithms_catalog, :algorithms_catalog_1, {:definition => "see Helma 2016 and lazar.in-silico.ch, submitted version: #{lazar_commit}", :description => "modified k-nearest neighbor #{model_type}"}
+ report.change_catalog :algorithms_catalog, :algorithms_catalog_1, {:definition => "see Helma 2016 and lazar.in-silico.ch, submitted version: #{lazar_commit}", :description => "#{model.neighbor_algorithm.gsub('_',' ').titleize}#{(model.neighbor_algorithm_parameters[:min_sim] ? ' with similarity > ' + model.neighbor_algorithm_parameters[:min_sim].to_s : '')}"}
report.ref_catalog :algorithm_explicit, :algorithms_catalog, :algorithms_catalog_1
+ report.change_catalog :algorithms_catalog, :algorithms_catalog_3, {:definition => "see Helma 2016 and lazar.in-silico.ch, submitted version: #{lazar_commit}", :description => "modified k-nearest neighbor #{model_type}"}
+ report.ref_catalog :algorithm_explicit, :algorithms_catalog, :algorithms_catalog_3
report.change_catalog :algorithms_catalog, :algorithms_catalog_2, {:definition => "see Helma 2016 and lazar.in-silico.ch, submitted version: #{lazar_commit}", :description => "#{model.prediction_algorithm.gsub('OpenTox::Algorithm::','').gsub('_',' ').titleize.gsub('.', ' with ')}"}
report.ref_catalog :algorithm_explicit, :algorithms_catalog, :algorithms_catalog_2
@@ -92,7 +95,7 @@ get "/report/:id/?" do
report.ref_catalog :algorithms_descriptors, :descriptors_catalog, :descriptors_catalog_1
# Descriptor selection 4.4
- report.value "descriptors_selection", "statistical filter (chi-square with Yates correction)"
+ report.value "descriptors_selection", "#{model.feature_selection_algorithm.gsub('_',' ')} #{model.feature_selection_algorithm_parameters.collect{|k,v| k.to_s + ': ' + v.to_s}.join(', ')}" if model.feature_selection_algorithm
# Algorithm and descriptor generation 4.5
report.value "descriptors_generation", "exhaustive breadth first search for paths in chemical graphs (simplified MolFea algorithm)"