Skip to content

Instantly share code, notes, and snippets.

@DiogoRibeiro7
Created September 28, 2023 10:17
Show Gist options
  • Save DiogoRibeiro7/bc55c9bc66a400ab51b0995592f3061b to your computer and use it in GitHub Desktop.
Save DiogoRibeiro7/bc55c9bc66a400ab51b0995592f3061b to your computer and use it in GitHub Desktop.
def gaussian_prior(mean: float, std: float) -> Callable[[int], float]:
"""
Create a Gaussian prior distribution centered around the mean.
Parameters:
- mean (float): The mean of the Gaussian distribution
- std (float): The standard deviation of the Gaussian distribution
Returns:
- Callable[[int], float]: A function representing the Gaussian prior
"""
return lambda x: norm.pdf(x, mean, std)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment