title: Torch/Lua, how to compute Area Under the Curve (AUC)?
body: <p>I'm new to Torch, and I am working on a problem where I have to depict the Receiver Operating Characteristic (ROC) curves and their Areas Under the Curve (AUC).</p>
  
  <p>I have to arrays: <code>TPrate</code> on the y axis and <code>FPrate</code> on the x axis, having both size <code>n</code></p>
  
  <p><strong>How could I compute the Area Under the Curve of this function in Torch7 or Lua?</strong></p>
  
  <p>I also found <a href="http://www.jayglascoe.com/2013/09/12/a-lua-toolbox-corona-sdk-glider-ide-gsl-library-and-luajit-compiler" rel="nofollow">this code from JayClascoe.com</a> but I don't know how to use its functions.</p>