docs: function groupSubtitles(subs, sensitivity) 
  {
    var groups = [];
  
    var avg = subs
      .map(function(x) { return (x.heatmap.reduce(function(a,b) { return a+b },0) / x.heatmap.length) || 0 })
      .reduce(function(a,b) { return a+b }, 0) / subs.length;
  
    var h = avg > 0.5 ? avg : 1-avg,
        l = avg > 0.5 ? 1-avg : avg,
        threshold =  groups.threshold = h + ( sensitivity || OVERLAP_FRACTION )*l;
  
    subs.forEach(function(sub) {
      var maxScore = 0, bestGroup;
      groups.forEach(function(group) {
        var avg = average(_.pluck(group, "heatmap"));
        var s = compare(avg, sub.heatmap);
        if (s > maxScore) {
          bestGroup = group;
          maxScore = s;
        }
      });
      if (!bestGroup || maxScore < threshold)
        groups.push([ sub ]);
      else bestGroup.push(sub);
    });
    groups.sort(function(a,b) { return b.length - a.length });
    return groups;
  }