public function setInitialTheta(array $theta)
    {
        if (count($theta) != $this->dimensions) {
            throw new \Exception("Number of values in the weights array should be $this->dimensions");
        }

        $this->theta = $theta;

        return $this;
    }
public function setInitialTheta(array $theta)
    {
        if (count($theta) != $this->dimensions) {
            throw new \Exception("Number of values in the weights array should be $this->dimensions");
        }

        $this->theta = $theta;

        return $this;
    }
public function setInitialTheta ( array $ theta ) { if ( count ( $ theta ) != $ this -> dimensions ) { throw new \ Exception ( "Number of values in the weights array should be $this->dimensions" ) ; } $ this -> theta = $ theta ; return $ this ; }
Sets the weights manually

@param array $theta

@return $this

@throws \Exception
Sets the weights manually