Zeel commited on
Commit
532e91a
·
1 Parent(s): 6656ee8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import numpy as np
2
  import streamlit as st
3
  import matplotlib.pyplot as plt
4
- plt.style.use('fivethirtyeight')
5
 
6
  st.subheader("Gaussian Process Regression with Squared Exponential Kernel")
7
 
@@ -30,7 +30,7 @@ def rbf_kernel(x1, x2, lengthscale, variance):
30
  dist_sqr = (x1_ - x2_) ** 2
31
  return variance * np.exp(-dist_sqr)
32
 
33
- fig, ax = plt.subplots(figsize=(10,4), facecolor='white')
34
 
35
  x_train = np.array([0.2, 0.5, 0.8]).reshape(-1,1)
36
  y_train = np.array([0.8, 0.3, 0.6]).reshape(-1,1)
@@ -58,7 +58,6 @@ ax.fill_between(x_test.ravel(), pred_mean.ravel()-pred_std2.ravel(),
58
  pred_mean.ravel()+pred_std2.ravel(), alpha=0.5, label='$\\mu \\pm 2\\sigma$')
59
  ax.set_xlabel('x')
60
  ax.set_ylabel('y')
61
- ax.set_facecolor('white')
62
  ax.legend()
63
 
64
  with st_col:
 
1
  import numpy as np
2
  import streamlit as st
3
  import matplotlib.pyplot as plt
4
+ # plt.style.use('fivethirtyeight')
5
 
6
  st.subheader("Gaussian Process Regression with Squared Exponential Kernel")
7
 
 
30
  dist_sqr = (x1_ - x2_) ** 2
31
  return variance * np.exp(-dist_sqr)
32
 
33
+ fig, ax = plt.subplots(figsize=(10,4))
34
 
35
  x_train = np.array([0.2, 0.5, 0.8]).reshape(-1,1)
36
  y_train = np.array([0.8, 0.3, 0.6]).reshape(-1,1)
 
58
  pred_mean.ravel()+pred_std2.ravel(), alpha=0.5, label='$\\mu \\pm 2\\sigma$')
59
  ax.set_xlabel('x')
60
  ax.set_ylabel('y')
 
61
  ax.legend()
62
 
63
  with st_col: