Skip to content

Commit c0fb6c6

Browse files
Remove unused eps parameter from relevant kernels (#2675)
1 parent 73a98a5 commit c0fb6c6

14 files changed

Lines changed: 0 additions & 32 deletions

gpytorch/kernels/cosine_kernel.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ class CosineKernel(Kernel):
3535
Set this if you want to apply a prior to the period length parameter. Default: `None`
3636
period_length_constraint (Constraint, optional):
3737
Set this if you want to apply a constraint to the period length parameter. Default: `Positive`.
38-
eps (float):
39-
The minimum value that the lengthscale/period length can take
40-
(prevents divide by zero errors). Default: `1e-6`.
4138
4239
Attributes:
4340
period_length (Tensor):

gpytorch/kernels/keops/matern_kernel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ class MaternKernel(KeOpsKernel):
5252
:param lengthscale_constraint: (Default: `Positive`) Set this if you want
5353
to apply a constraint to the lengthscale parameter.
5454
:type lengthscale_constraint: ~gpytorch.constraints.Interval, optional
55-
:param eps: (Default: 1e-6) The minimum value that the lengthscale can take (prevents divide by zero errors).
56-
:type eps: float, optional
5755
"""
5856

5957
has_lengthscale = True

gpytorch/kernels/keops/periodic_kernel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@ class PeriodicKernel(KeOpsKernel, GPeriodicKernel):
4848
:param lengthscale_constraint: (Default: `Positive`) Set this if you want
4949
to apply a constraint to the lengthscale parameter.
5050
:type lengthscale_constraint: ~gpytorch.constraints.Interval, optional
51-
:param eps: (Default: 1e-6) The minimum value that the lengthscale can take (prevents divide by zero errors).
52-
:type eps: float, optional
5351
5452
:var torch.Tensor period_length: The period length parameter. Size/shape of parameter depends on the
5553
ard_num_dims and batch_shape arguments.

gpytorch/kernels/keops/rbf_kernel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class RBFKernel(KeOpsKernel):
3232
lengthscale parameter. (Default: `None`)
3333
:param lengthscale_constraint: Set this if you want to apply a constraint
3434
to the lengthscale parameter. (Default: `Positive`.)
35-
:param eps: The minimum value that the lengthscale can take (prevents
36-
divide by zero errors). (Default: `1e-6`.)
3735
3836
:ivar torch.Tensor lengthscale: The lengthscale parameter. Size/shape of parameter depends on the
3937
ard_num_dims and batch_shape arguments.

gpytorch/kernels/kernel.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ class Kernel(Module):
136136
lengthscale parameter. (Default: `None`.)
137137
:param lengthscale_constraint: Set this if you want to apply a constraint
138138
to the lengthscale parameter. (Default: :class:`~gpytorch.constraints.Positive`.)
139-
:param eps: A small positive value added to the lengthscale to prevent
140-
divide by zero errors. (Default: `1e-6`.)
141139
142140
:ivar torch.Size batch_shape:
143141
The (minimum) number of batch dimensions supported by this kernel.
@@ -169,7 +167,6 @@ def __init__(
169167
active_dims: Optional[Tuple[int, ...]] = None,
170168
lengthscale_prior: Optional[Prior] = None,
171169
lengthscale_constraint: Optional[Interval] = None,
172-
eps: float = 1e-6,
173170
**kwargs,
174171
):
175172
super(Kernel, self).__init__()
@@ -179,8 +176,6 @@ def __init__(
179176
self.register_buffer("active_dims", active_dims)
180177
self.ard_num_dims = ard_num_dims
181178

182-
self.eps = eps
183-
184179
param_transform = kwargs.get("param_transform")
185180

186181
if lengthscale_constraint is None:

gpytorch/kernels/matern52_kernel_grad.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ class Matern52KernelGrad(MaternKernel):
7373
lengthscale parameter. (Default: `None`)
7474
:param lengthscale_constraint: Set this if you want to apply a constraint
7575
to the lengthscale parameter. (Default: `Positive`.)
76-
:param eps: The minimum value that the lengthscale can take (prevents
77-
divide by zero errors). (Default: `1e-6`.)
7876
7977
:ivar torch.Tensor lengthscale: The lengthscale parameter. Size/shape of parameter depends on the
8078
ard_num_dims and batch_shape arguments.

gpytorch/kernels/matern_kernel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ class MaternKernel(Kernel):
5656
:param lengthscale_constraint: (Default: `Positive`) Set this if you want
5757
to apply a constraint to the lengthscale parameter.
5858
:type lengthscale_constraint: ~gpytorch.constraints.Interval, optional
59-
:param eps: (Default: 1e-6) The minimum value that the lengthscale can take (prevents divide by zero errors).
60-
:type eps: float, optional
6159
6260
Example:
6361
>>> x = torch.randn(10, 5)

gpytorch/kernels/periodic_kernel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ class PeriodicKernel(Kernel):
5959
:param lengthscale_constraint: (Default: `Positive`) Set this if you want
6060
to apply a constraint to the lengthscale parameter.
6161
:type lengthscale_constraint: ~gpytorch.constraints.Interval, optional
62-
:param eps: (Default: 1e-6) The minimum value that the lengthscale can take (prevents divide by zero errors).
63-
:type eps: float, optional
6462
6563
:var torch.Tensor period_length: The period length parameter. Size/shape of parameter depends on the
6664
ard_num_dims and batch_shape arguments.

gpytorch/kernels/piecewise_polynomial_kernel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ class PiecewisePolynomialKernel(Kernel):
7070
:param lengthscale_constraint: (Default: `Positive`) Set this if you want
7171
to apply a constraint to the lengthscale parameter.
7272
:type lengthscale_constraint: ~gpytorch.constraints.Positive, optional
73-
:param eps: (Default: 1e-6) The minimum value that the lengthscale can take (prevents divide by zero errors).
74-
:type eps: float, optional
7573
7674
.. _Rasmussen and Williams (2006):
7775
http://www.gaussianprocess.org/gpml/

gpytorch/kernels/rbf_kernel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ class RBFKernel(Kernel):
4141
lengthscale parameter. (Default: `None`)
4242
:param lengthscale_constraint: Set this if you want to apply a constraint
4343
to the lengthscale parameter. (Default: `Positive`.)
44-
:param eps: The minimum value that the lengthscale can take (prevents
45-
divide by zero errors). (Default: `1e-6`.)
4644
4745
:ivar torch.Tensor lengthscale: The lengthscale parameter. Size/shape of parameter depends on the
4846
ard_num_dims and batch_shape arguments.

0 commit comments

Comments
 (0)