garage.tf.regressors.regressor module

Regressor base classes without Parameterized.

class Regressor(input_shape, output_dim, name)[source]

Bases: garage.tf.models.module.Module

Regressor base class.

Parameters:
  • input_shape (tuple[int]) – Input shape.
  • output_dim (int) – Output dimension.
  • name (str) – Name of the regressor.
fit(xs, ys)[source]

Fit with input data xs and label ys.

Parameters:
  • xs (numpy.ndarray) – Input data.
  • ys (numpy.ndarray) – Label of input data.
predict(xs)[source]

Predict ys based on input xs.

Parameters:xs (numpy.ndarray) – Input data.
Returns:The predicted ys.
class StochasticRegressor(input_shape, output_dim, name)[source]

Bases: garage.tf.regressors.regressor.Regressor, garage.tf.models.module.StochasticModule

StochasticRegressor base class.

log_likelihood_sym(x_var, y_var, name=None)[source]

Symbolic graph of the log likelihood.

Parameters:
  • x_var (tf.Tensor) – Input tf.Tensor for the input data.
  • y_var (tf.Tensor) – Input tf.Tensor for the label of data.
  • name (str) – Name of the new graph.
Returns:

tf.Tensor output of the symbolic log likelihood.