Fixing analysis.scala to properly deal with log likelihood