From 350b379332a6ee4e5eb55504a7b121c1268ebf21 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 31 Oct 2016 15:18:51 +0000 Subject: removed obsolete code --- views/predict.haml | 7 ------- views/prediction.haml | 16 ---------------- 2 files changed, 23 deletions(-) (limited to 'views') 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"+"2"+":" - = @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? -- cgit v1.2.3