The radial basis function (RBF) or squared exponential kernel. The kernel equation is k(r) = σ² exp{-½ r²} where: r is the Euclidean distance between the input points, scaled by the lengthscales parameter ℓ. σ² is the variance parameter Functions drawn from a GP wi
| 193 | |
| 194 | |
| 195 | class SquaredExponential(IsotropicStationary): |
| 196 | """ |
| 197 | The radial basis function (RBF) or squared exponential kernel. The kernel equation is |
| 198 | |
| 199 | k(r) = σ² exp{-½ r²} |
| 200 | |
| 201 | where: |
| 202 | r is the Euclidean distance between the input points, scaled by the lengthscales parameter ℓ. |
| 203 | σ² is the variance parameter |
| 204 | |
| 205 | Functions drawn from a GP with this kernel are infinitely differentiable! |
| 206 | """ |
| 207 | |
| 208 | @inherit_check_shapes |
| 209 | def K_r2(self, r2: TensorType) -> tf.Tensor: |
| 210 | return self.variance * tf.exp(-0.5 * r2) |
| 211 | |
| 212 | |
| 213 | class RationalQuadratic(IsotropicStationary): |
no outgoing calls
searching dependent graphs…