public function average()
    {
        $flat = $this->flatten();

        $avg = array();
        foreach ($flat as $metric => $values) {
            $avg[$metric] = (float) number_format(array_sum($values) / count($values), 2, '.', '');
        }

        return $avg;
    }