public function setThreshold($threshold)
    {
        if (is_numeric($threshold)) {
            $this->threshold = $threshold;
            $this->svm->setOptions(
                array(
                    \SVM::OPT_PROBABILITY => true
                )
            );
            if ($this->model->isPrepared()) {
                $this->model->setPrepared(false);
            }
        } else {
            throw new \InvalidArgumentException("Threshold must be a float value between 0-1");
        }
    }
public function setThreshold($threshold)
    {
        if (is_numeric($threshold)) {
            $this->threshold = $threshold;
            $this->svm->setOptions(
                array(
                    \SVM::OPT_PROBABILITY => true
                )
            );
            if ($this->model->isPrepared()) {
                $this->model->setPrepared(false);
            }
        } else {
            throw new \InvalidArgumentException("Threshold must be a float value between 0-1");
        }
    }
public function setThreshold ( $ threshold ) { if ( is_numeric ( $ threshold ) ) { $ this -> threshold = $ threshold ; $ this -> svm -> setOptions ( array ( \ SVM :: OPT_PROBABILITY => true ) ) ; if ( $ this -> model -> isPrepared ( ) ) { $ this -> model -> setPrepared ( false ) ; } } else { throw new \ InvalidArgumentException ( "Threshold must be a float value between 0-1" ) ; } }
Set the threshold probability a classifier document must meet
@param  float                     $threshold float value between 0-1
@throws \InvalidArgumentException
Set the threshold probability a classifier document must meet