From 8452f160e524aab7f163067ffbf8e3fb42ae1b13 Mon Sep 17 00:00:00 2001 From: gebele Date: Mon, 23 Oct 2017 11:18:07 +0000 Subject: ensure collecting all structural alerts --- application.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application.rb b/application.rb index 7f8e344..380b48a 100644 --- a/application.rb +++ b/application.rb @@ -192,7 +192,7 @@ get '/batch/:model/' do confidence = ( 1 - sa_prediction[:error_product] ) - 0.57 end output['sa_prediction'] = sa_prediction - output['sa_matches'] = sa_prediction[:matches].flatten.first unless sa_prediction[:matches].blank? + output['sa_matches'] = sa_prediction[:matches].collect{|a| a.first}.join("; ") unless sa_prediction[:matches].blank? output['confidence'] = confidence.signif(3) output['model_name'] = "Lazar #{model.endpoint.gsub('_', ' ').downcase} (#{model.species}):" output['probability'] = prediction[:probabilities] ? prediction[:probabilities].collect{|k,v| "#{k}: #{v.signif(3)}"} : false -- cgit v1.2.3