<jupyter_start><jupyter_text>2020-08-03: Exploring Gaussian Processes*Last Updated*: 2020-08-03 Authors* <NAME> (<EMAIL>) OverviewIn this Jupyter notebook, we explore Gaussian processes. User parameters Gaussian process parameters* `domain`: domain for Gaussian process* `length_scale`: length scale for Gaussian process* `variance_scale`: variance scale for Gaussian process Sample parameters* `num_samples`: number of samples to generate<jupyter_code># --- Imports

# External packages
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
# --- User parameters

# Gaussian process parameters
domain = {'min': -5.0, 'max': 5.0}
length_scale = 2
variance_scale = 1

# Sample parameters
num_samples = 5
# --- Preparations

# Seaborn configuration
sns.set(color_codes=True)
# --- Generate samples from Gaussian process

# Preparations
dX = 0.01
X = np.arange(domain['min'], domain['max'], dX)

# Set mean function
m = np.zeros(X.shape)

# Compute covariance function kernel function
diff_X = np.subtract.outer(X, X)
K = variance_scale * np.exp(-1/2*np.square(diff_X) / length_scale)

# Generate samples from Gaussian process
f = []
for _ in range(num_samples):
    f.append(np.random.multivariate_normal(m, K))
    
# Plot samples
for i in range(num_samples):
    plt.plot(X, f[i])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11361926260346125, 'fraction_numerical': 0.021068472535741158, 'mean_word_length': 5.045454545454546, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '108441', 'license': 'Apache-2.0', 'n_tokens_mistral': 446, 'n_tokens_neox': 417, 'n_words': 132, 'path': 'notebooks/2020-08-03-KTC-gaussian_processes.ipynb', 'repo_name': 'ktchu/RESEARCH-math-exploration', 'size': '1341'}