summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2016-10-31 15:18:51 +0000
committergebele <gebele@in-silico.ch>2016-10-31 15:18:51 +0000
commit350b379332a6ee4e5eb55504a7b121c1268ebf21 (patch)
tree15f237db12c5bb06fb02e2ee017167ba4b5db7bc /views
parent4b8e18a19f375b8d4c12621ec8f8f9ee305d11fa (diff)
removed obsolete code
Diffstat (limited to 'views')
-rw-r--r--views/predict.haml7
-rw-r--r--views/prediction.haml16
2 files changed, 0 insertions, 23 deletions
diff --git a/views/predict.haml b/views/predict.haml
index 0630b2c..5d5d6f0 100644
--- a/views/predict.haml
+++ b/views/predict.haml
@@ -51,7 +51,6 @@
Neighbor algorithm parameter:
= "min sim = #{m.model.neighbor_algorithm_parameters["min_sim"]}"
%p
- -#- cv = OpenTox::CrossValidation.find(m.repeated_crossvalidation_id)
%b Independent crossvalidations (log2 transformed):
- crossvalidations =[]
- m.repeated_crossvalidation.crossvalidation_ids.each{|cv| c = OpenTox::Validation::CrossValidation.find(cv); crossvalidations << c}
@@ -91,7 +90,6 @@
%input{:id=>"example_core",:type=>"hidden",:name=>"example_core",:value=>"#{example.core}"}
%input{:id=>"example_coating",:type=>"hidden",:name=>"example_coating",:value=>"#{example.coating}"}
%input{:id=>"example_pc",:type=>"hidden",:name=>"example_pc",:value=>"#{example.physchem_descriptors}"}
- -#- size = example.physchem_descriptors.size
- size = relevant_features.size
%input{:id=>"size",:type=>"hidden",:name=>"size",:value=>size}
%input{:id=>"id",:type=>"hidden",:name=>"example_id",:value=>example.id}
@@ -110,13 +108,8 @@
// prediction model id
%input{:id=>"prediction_model",:type=>"hidden",:name=>"prediction_model",:value=>m.id}
- relevant_features.sort_by{|d| d.category}.each_with_index do |relf,id|
- -#- example.physchem_descriptors.sort_by{|d| OpenTox::Feature.find(d[0]).category}.each_with_index do |v,id|
- feature = relf
- /%p= feature.id
- v = example.physchem_descriptors.find{|id,v| id == feature.id.to_s }
- /%p= v
- -#- feature = OpenTox::Feature.find_by(:id => v[0])
- -#- feature = v
- name = feature.name
- if feature[:conditions] && !feature[:conditions]["MEDIUM"].blank?
- name = feature.name + " / " + feature[:conditions]["MEDIUM"]
diff --git a/views/prediction.haml b/views/prediction.haml
index e6b4ae4..53a9cfd 100644
--- a/views/prediction.haml
+++ b/views/prediction.haml
@@ -43,7 +43,6 @@
Net cell association
%br
[mL/ug(Mg)]
- -#- @input.sort_by{|d| OpenTox::Feature.find(d[0]).category}.each do |key|
- @input.each{|d| OpenTox::Feature.find(d[0]).category}.each do |key|
- feature = OpenTox::Feature.find_by(:id=>key[0])
- name = feature.name
@@ -95,16 +94,6 @@
%h5.th5 Prediction:
= "not available"
%br
- -#- if @prediction[:rmse]
- %h5.th5
- %a{:href=>"https://en.wikipedia.org/wiki/Root-mean-square_deviation", :rel=>"external"} RMSE:
- = @prediction[:rmse].round(3)
- %br
- -#- if @prediction[:r_squared]
- %h5.th5
- %a{:href=>"https://en.wikipedia.org/wiki/Coefficient_of_determination", :rel=>"external"}= "R"+"<sup>2</sup>"+":"
- = @prediction[:r_squared].round(3)
- %br
- if @prediction[:prediction_interval]
%h5
%a{:href=>"https://en.wikipedia.org/wiki/Prediction_interval", :rel=>"external"} 95% Prediction interval:
@@ -118,7 +107,6 @@
- if !@prediction[:value] && !@prediction[:measurements]
%h5.th5 not available
/ physchem
- -#- @input.sort_by{|d| OpenTox::Feature.find(d[0]).category}.each do |v|
- @input.each do |v|
%td.physchem
%div{:style=>"display:inline-block;padding-right:20px;"}
@@ -131,7 +119,6 @@
- if @prediction[:neighbors]
- @prediction[:neighbors].each_with_index do |neighbor,idx|
- nano = OpenTox::Nanoparticle.find(neighbor["_id"])
- -#- nano.physchem_descriptors.delete_if{|id,v| OpenTox::Feature.find(id).category != "P-CHEM"} if @type == "pc"
%tr
/ ID
%td
@@ -152,9 +139,6 @@
%h5.th5 Measurement:
= neighbor["measurements"][0]
/ Physchem
- -#- nano.physchem_descriptors.delete_if{|id,v| @type == "pc" ? !@pc_relevant_features.include?(OpenTox::Feature.find(id)) : !@pcp_relevant_features.include?(OpenTox::Feature.find(id))}.sort_by{|id,v| OpenTox::Feature.find(id).category}.each do |k,v|
- nano.physchem_descriptors.delete_if{|id,v| @type == "pc" ? !@pc_relevant_features.include?(OpenTox::Feature.find(id)) : !@pcp_relevant_features.include?(OpenTox::Feature.find(id))}.sort_by{|id,v| @pc_relevant_features.index OpenTox::Feature.find(id)}.each do |k,v|
%td.physchem
- -#%div
- %div{:style=>"display:inline-block;padding-right:20px;"}
= v[0].round(3) unless v.nil?