This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
import numpy as np | |
inv = np.linalg.inv | |
class GaussianProcess: | |
def __init__(self, kernel, observed_index_points, observed_values, | |
mean_function=None, stddev=1.0, noise_var=0.0): | |
self.observed_index_points = self._handle(observed_index_points) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Laplace approximation of a Beta distribution. | |
""" | |
import matplotlib.pyplot as plt | |
import torch | |
x = torch.linspace(0, 1, 200) | |
p = torch.distributions.Beta(2, 5) | |