public function getProbabilities($document)
    {
        if ($this->hasThreshold()) {
            $model = $this->preparedModel();
            $data = $this->prepareDocument($document, $model);
            $probabilities = array();
            $model->getModel()->predict_probability($data, $probabilities);

            return array_combine($model->getCategoryMap(), $probabilities);
        }
    }
public function getProbabilities($document)
    {
        if ($this->hasThreshold()) {
            $model = $this->preparedModel();
            $data = $this->prepareDocument($document, $model);
            $probabilities = array();
            $model->getModel()->predict_probability($data, $probabilities);

            return array_combine($model->getCategoryMap(), $probabilities);
        }
    }
public function getProbabilities ( $ document ) { if ( $ this -> hasThreshold ( ) ) { $ model = $ this -> preparedModel ( ) ; $ data = $ this -> prepareDocument ( $ document , $ model ) ; $ probabilities = array ( ) ; $ model -> getModel ( ) -> predict_probability ( $ data , $ probabilities ) ; return array_combine ( $ model -> getCategoryMap ( ) , $ probabilities ) ; } }
Returns the probabilities of the document being in each category
@param  string $document
@return array
Returns the probabilities of the document being in each category