botorch.distributions¶

class
botorch.distributions.
Kumaraswamy
(concentration1, concentration0, validate_args=False)[source]¶ Bases:
torch.distributions.transformed_distribution.TransformedDistribution
A Kumaraswamy distribution.
Example:
>>> m = Kumaraswamy(torch.Tensor([1.0]), torch.Tensor([1.0])) >>> m.sample() # sample from a Kumaraswamy distribution tensor([ 0.1729])
 Parameters
concentration1 (
Union
[float
,Tensor
]) – 1st concentration parameter of the distribution (often referred to as alpha)concentration0 (
Union
[float
,Tensor
]) – 2nd concentration parameter of the distribution (often referred to as beta)

arg_constraints
= {'concentration0': GreaterThan(lower_bound=0.0), 'concentration1': GreaterThan(lower_bound=0.0)}¶

support
= Interval(lower_bound=0.0, upper_bound=1.0)¶

has_rsample
= True¶

expand
(batch_shape, _instance=None)[source]¶ Returns a new distribution instance (or populates an existing instance provided by a derived class) with batch dimensions expanded to batch_shape. This method calls
expand
on the distribution’s parameters. As such, this does not allocate new memory for the expanded distribution instance. Additionally, this does not repeat any args checking or parameter broadcasting in __init__.py, when an instance is first created. Parameters
batch_shape (torch.Size) – the desired expanded size.
_instance (
Optional
[Kumaraswamy
]) – new instance provided by subclasses that need to override .expand.
 Return type
 Returns
New distribution instance with batch dimensions expanded to batch_size.

property
mean
¶ Returns the mean of the distribution.
 Return type
None

property
variance
¶ Returns the variance of the distribution.
 Return type
None
Distributions¶
Probability Distributions.
This is modified from https://github.com/probtorch/pytorch/pull/143 and https://github.com/tensorflow/probability/blob/v0.11.1/ tensorflow_probability/python/distributions/kumaraswamy.py.
TODO: replace with PyTorch version once the PR is up and landed.

class
botorch.distributions.distributions.
Kumaraswamy
(concentration1, concentration0, validate_args=False)[source]¶ Bases:
torch.distributions.transformed_distribution.TransformedDistribution
A Kumaraswamy distribution.
Example:
>>> m = Kumaraswamy(torch.Tensor([1.0]), torch.Tensor([1.0])) >>> m.sample() # sample from a Kumaraswamy distribution tensor([ 0.1729])
 Parameters
concentration1 (
Union
[float
,Tensor
]) – 1st concentration parameter of the distribution (often referred to as alpha)concentration0 (
Union
[float
,Tensor
]) – 2nd concentration parameter of the distribution (often referred to as beta)

arg_constraints
= {'concentration0': GreaterThan(lower_bound=0.0), 'concentration1': GreaterThan(lower_bound=0.0)}¶

support
= Interval(lower_bound=0.0, upper_bound=1.0)¶

has_rsample
= True¶

expand
(batch_shape, _instance=None)[source]¶ Returns a new distribution instance (or populates an existing instance provided by a derived class) with batch dimensions expanded to batch_shape. This method calls
expand
on the distribution’s parameters. As such, this does not allocate new memory for the expanded distribution instance. Additionally, this does not repeat any args checking or parameter broadcasting in __init__.py, when an instance is first created. Parameters
batch_shape (torch.Size) – the desired expanded size.
_instance (
Optional
[Kumaraswamy
]) – new instance provided by subclasses that need to override .expand.
 Return type
 Returns
New distribution instance with batch dimensions expanded to batch_size.

property
mean
¶ Returns the mean of the distribution.
 Return type
None

property
variance
¶ Returns the variance of the distribution.
 Return type
None