protected function prepareFprime(array &$feature_array, array &$l)
    {
        $this->denominators = array();
        foreach ($feature_array as $offset=>$doc) {
            $numerator = array_fill_keys(array_keys($doc),0.0);
            $denominator = 0.0;
            foreach ($doc as $cl=>$f) {
                if (!is_array($f)) continue;
                $tmp = 0.0;
                foreach ($f as $i) {
                    $tmp += $l[$i];
                }
                $tmp = exp($tmp);
                $numerator[$cl] += $tmp;
                $denominator += $tmp;
            }
            foreach ($doc as $class=>$features) {
                if (!is_array($features)) continue;
                foreach ($features as $fi) {
                    if (!isset($this->denominators[$fi])) {
                        $this->denominators[$fi] = 0;
                    }
                    $this->denominators[$fi] += $numerator[$class]/$denominator;
                }
            }
        }
    }