autogp/gaussian_process.py
def predict(self, test_inputs, batch_size=None):
        """
        Predict outputs given inputs.

        Parameters
        ----------
        test_inputs : ndarray
            Points on which we wish to make predictions.
            Dimensions: num_test * input_dim.
        batch_size : int
            The size of the batches we make predictions on.
            If batch_size is None, predict on the
            entire test set at once.

        Returns
        -------
        ndarray
            The predicted mean of the test inputs.
            Dimensions: num_test * output_dim.
        ndarray
            The predicted variance of the test inputs.
            Dimensions: num_test * output_dim.
        """
        if batch_size is None:
            num_batches = 1
        else:
            num_batches = util.ceil_divide(test_inputs.shape[0], batch_size)

        test_inputs = np.array_split(test_inputs, num_batches)
        pred_means = util.init_list(0.0, [num_batches])
        pred_vars = util.init_list(0.0, [num_batches])
        for i in range(num_batches):
            pred_means[i], pred_vars[i] = self.session.run(
                self.predictions, feed_dict={self.test_inputs: test_inputs[i]})

        return np.concatenate(pred_means, axis=0), np.concatenate(pred_vars, axis=0)

        Predict outputs given inputs.

        Parameters
        ----------
        test_inputs : ndarray
            Points on which we wish to make predictions.
            Dimensions: num_test * input_dim.
        batch_size : int
            The size of the batches we make predictions on.
            If batch_size is None, predict on the
            entire test set at once.

        Returns
        -------
        ndarray
            The predicted mean of the test inputs.
            Dimensions: num_test * output_dim.
        ndarray
            The predicted variance of the test inputs.
            Dimensions: num_test * output_dim.
        
Predict outputs given inputs.
Parameters

test_inputs : ndarray
Points on which we wish to make predictions.

Returns

ndarray
The predicted mean of the test inputs.
Predict outputs given inputs . Parameters test_inputs : ndarray Points on which we wish to make predictions . Returns ndarray The predicted mean of the test inputs .
def predict(self, test_inputs, batch_size=None):
        if batch_size is None:
            num_batches = 1
        else:
            num_batches = util.ceil_divide(test_inputs.shape[0], batch_size)
        test_inputs = np.array_split(test_inputs, num_batches)
        pred_means = util.init_list(0.0, [num_batches])
        pred_vars = util.init_list(0.0, [num_batches])
        for i in range(num_batches):
            pred_means[i], pred_vars[i] = self.session.run(
                self.predictions, feed_dict={self.test_inputs: test_inputs[i]})
        return np.concatenate(pred_means, axis=0), np.concatenate(pred_vars, axis=0)
def predict ( self , test_inputs , batch_size = None ) : if batch_size is None : num_batches = 1 else : num_batches = util . ceil_divide ( test_inputs . shape [ 0 ] , batch_size ) test_inputs = np . array_split ( test_inputs , num_batches ) pred_means = util . init_list ( 0.0 , [ num_batches ] ) pred_vars = util . init_list ( 0.0 , [ num_batches ] ) for i in range ( num_batches ) : pred_means [ i ] , pred_vars [ i ] = self . session . run ( self . predictions , feed_dict = { self . test_inputs : test_inputs [ i ] } ) return np . concatenate ( pred_means , axis = 0 ) , np . concatenate ( pred_vars , axis = 0 )
Predict outputs given inputs.
Predict outputs given inputs .
"""
        Predict outputs given inputs.

        Parameters
        ----------
        test_inputs : ndarray
            Points on which we wish to make predictions.
            Dimensions: num_test * input_dim.
        batch_size : int
            The size of the batches we make predictions on.
            If batch_size is None, predict on the
            entire test set at once.

        Returns
        -------
        ndarray
            The predicted mean of the test inputs.
            Dimensions: num_test * output_dim.
        ndarray
            The predicted variance of the test inputs.
            Dimensions: num_test * output_dim.
        """
self
test_inputs
batch_size