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");
        }
    }