Skip to content

Commit

Permalink
Shush rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed Jan 22, 2018
1 parent cfba7c1 commit 1b63773
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/graphs_controller.rb
Expand Up @@ -184,7 +184,9 @@ def af_accuracy
range = 0..maxlen
# BEHOLD. MAGIC.
# Okay fine. Calculates accuracy for each weight 10-group, providing a value (0) for fps if it's not there, and clamping to 0.9..1.0.
acc_data = range.map { |i| [data[:tps][i][0], ([data[:tps][i][1].to_f / (data[:tps][i][1] + (data[:fps][i] || [0, 0])[1]), 0.90].max * 100).round(2)] }
acc_data = range.map do |i|
[data[:tps][i][0], ([data[:tps][i][1].to_f / (data[:tps][i][1] + (data[:fps][i] || [0, 0])[1]), 0.90].max * 100).round(2)]
end

render json: [{ name: 'Accuracy', data: acc_data }]
end
Expand Down

0 comments on commit 1b63773

Please sign in to comment.