public function predict(Dataset $dataset) : array
    {
        if (!$this->network) {
            throw new RuntimeException('The learner has not'
                . ' been trained.');
        }

        DatasetIsCompatibleWithEstimator::check($dataset, $this);

        $xT = Matrix::quick($dataset->samples())->transpose();

        return $this->network->infer($xT)->row(0);
    }
public function predict(Dataset $dataset) : array
    {
        if (!$this->network) {
            throw new RuntimeException('The learner has not'
                . ' been trained.');
        }

        DatasetIsCompatibleWithEstimator::check($dataset, $this);

        $xT = Matrix::quick($dataset->samples())->transpose();

        return $this->network->infer($xT)->row(0);
    }
public function predict ( Dataset $ dataset ) : array { if ( ! $ this -> network ) { throw new RuntimeException ( 'The learner has not' . ' been trained.' ) ; } DatasetIsCompatibleWithEstimator :: check ( $ dataset , $ this ) ; $ xT = Matrix :: quick ( $ dataset -> samples ( ) ) -> transpose ( ) ; return $ this -> network -> infer ( $ xT ) -> row ( 0 ) ; }
Feed a sample through the network and make a prediction based on the
activation of the output neuron.

@param \Rubix\ML\Datasets\Dataset $dataset
@throws \InvalidArgumentException
@throws \RuntimeException
@return array
Feed a sample through the network and make a prediction based on the activation of the output neuron .