From 7759519665408673e2ab1bfd8d32a84168c2ee34 Mon Sep 17 00:00:00 2001 From: gebele Date: Wed, 20 Apr 2016 14:39:22 +0000 Subject: adjusted prediction intervall info; units ; depiction --- views/prediction.haml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/views/prediction.haml b/views/prediction.haml index 4a2877e..5265504 100644 --- a/views/prediction.haml +++ b/views/prediction.haml @@ -47,7 +47,7 @@ = type %br %b Prediction: - = (type == "Regression") ? "#{'%.2e' % prediction[:value]} (#{unit}) | #{'%.2e' % @compound.mmol_to_mg(prediction[:value])} #{(unit == "mmol/L") ? "(mg/L)" : "(mg/kg_bw/day)"}" : prediction[:value] + = (type == "Regression") ? "#{'%.2e' % prediction[:value]} (#{unit}) , #{'%.2e' % @compound.mmol_to_mg(prediction[:value])} #{(unit == "mmol/L") ? "(mg/L)" : "(mg/kg_bw/day)"}" : prediction[:value] / tabindex=0 seems the best fix for FF|S browsers on OSX better than trigger="click focus" which ends up in double click for FF. / prediction popover %a.btn.glyphicon.glyphicon-info-sign{:href=>"#", :title=>"Prediction", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"left", html:"true", content:"LAZAR calculates searches the training dataset for similar compounds (neighbors) and calculates the prediction from their measured activities. LAZAR calculates predictions using Please keep in mind that predictions are based on the measured activities of neighbors."}} @@ -55,9 +55,10 @@ - if type == "Regression" %b 95% Prediction interval: - interval = prediction[:prediction_interval].nil? ? "[ - - ]" : prediction[:prediction_interval].collect{|i| i.round(2)} - = "[#{interval[0]} (#{unit}), #{interval[1]} (#{unit})]" + %br + = "[#{interval[0]} - #{interval[1]}] (#{unit}), [#{'%.2e' % @compound.mmol_to_mg(interval[0])} - #{'%.2e' % @compound.mmol_to_mg(interval[1])}] (mg/L)" / prediction intervall popover - %a.btn.glyphicon.glyphicon-info-sign{:href=>"#", :title=>"Prediction intervall", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"left", html:"true", content:"A prediction interval (wikipedia) is an estimate of an interval in which future observations will fall, with a certain probability, given what has already been observed."}} + %a.btn.glyphicon.glyphicon-info-sign{:href=>"#", :title=>"Prediction intervall", :tabindex=>"0", data: {trigger:"focus", toggle:"popover", placement:"left", html:"true", content:"An estimate of prediction uncertainty. The \"real\" value should be with 95% probability within the prediction interval."}} - else %b Confidence: = prediction[:confidence].round(2) unless prediction[:confidence].nil? -- cgit v1.2.3