diff options
author | gebele <gebele@in-silico.ch> | 2015-09-17 16:46:32 +0200 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2015-09-17 16:46:32 +0200 |
commit | c20b9fb92b56c7818a4f24b22eead665b1dd1143 (patch) | |
tree | 5116e2c41d485349daeae3e426d3bbd1f48e4c86 /views/batch.haml | |
parent | 1f3029412ad0a5d94c369b916b23593191b9534f (diff) |
save stadium
Diffstat (limited to 'views/batch.haml')
-rw-r--r-- | views/batch.haml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/views/batch.haml b/views/batch.haml new file mode 100644 index 0000000..5bae411 --- /dev/null +++ b/views/batch.haml @@ -0,0 +1,39 @@ +/ displays all prediction result in first table +%div.table-responsive + %table.table.table-bordered{:id=>"batch", :style=>"background-color:white;"} + %thead + %tr + %h3 Batch Prediction Results: + + %tbody + - @compounds.each_with_index do |compound,i| + %tr + %td{:id=>"compound", :style=>"vertical-align:top;"} + %p= compound.svg + %p= compound.smiles + - @predictions.each_with_index do |prediction,i| + %td{:style=>"vertical-align:top;"} + %b{:class => "title"} + = "#{@models[i].endpoint.gsub('_', ' ')} (#{@models[i].species})" + %p + - if prediction[:confidence] == "measured" + %p + / TODO fix scientific notation from database + %b Measured activity: + = prediction[:value].numeric? ? "#{prediction[:value].round(3)} (#{@models[i].unit})" : prediction[:value] + %p Compound is part of the training dataset + - elsif prediction[:neighbors].size > 0 + %p + / model type (classification|regression) + %b Type: + = @models[i].model.class.to_s.match("Classification") ? "Classification" : "Regression" + %br + %b Prediction: + / TODO scientific notation + = prediction[:value].numeric? ? "#{'%.2e' % prediction[:value]} #{@models[i].unit}" : prediction[:value] + %br + / TODO probability + %b Confidence: + = prediction[:confidence].round(3) + %p + %p |