public function getCentroid(array &$docs, array $choose=array())
    {
        $v = array();
        if (empty($choose))
            $choose = range(0,count($docs)-1);
        $cnt = count($choose);
        foreach ($choose as $idx) {
            $doc = $this->getVector($docs[$idx]);
            foreach ($doc as $k=>$w) {
                if (!isset($v[$k]))
                    $v[$k] = $w;
                else
                    $v[$k] += $w;
            }
        }
        foreach ($v as &$w) {
            $w /= $cnt;
        }

        return $v;
    }