Zeel commited on
Commit
7001066
·
1 Parent(s): 6319656

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -3
app.py CHANGED
@@ -53,13 +53,30 @@ oly_y = np.array([ 4.47083333, 4.46472926, 5.22208333, 4.15467867,
53
 
54
  st.title("Heteroscedastic Gaussian Processes")
55
 
56
- st.markdown(r"We are learning the noise v/s inputs relationship with a neural net.")
57
-
58
- data = st.selectbox("Data", ["Motorcycle", "Olympic", 'GPflow'])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  if data == "Motorcycle":
60
  data_x, data_y = mcycle_x, mcycle_y
61
  elif data == "Olympic":
62
  data_x, data_y = oly_x, oly_y
 
 
 
63
  elif data == 'GPflow':
64
  N = 1001
65
 
 
53
 
54
  st.title("Heteroscedastic Gaussian Processes")
55
 
56
+ st.markdown(r"""
57
+ Gaussian processes generally assume Homoskedastic noise such as:
58
+ $$
59
+ y_{i}=f\left(\mathbf{x}_{i}\right)+\epsilon_{i}, \quad \epsilon_{i} \stackrel{\text { i.i.d. }}{\sim} \mathcal{N}\left(0, \sigma_{\epsilon}^{2}\right), \quad 1 \leq i \leq n
60
+ $$
61
+ We can also assume separate distribution of noise over each data point:
62
+ $$
63
+ y_{i}=f\left(\mathbf{x}_{i}\right)+\epsilon_{i}, \quad \epsilon_{i} {\sim} \mathcal{N}\left(0, \sigma_{\epsilon_i}^{2}\right), \quad 1 \leq i \leq n
64
+ $$
65
+ However, this may not be straightforward to extend for inference or conditioning. A simple idea can be to learn a non-linear neural network function to model the relationship between inputs and noise:
66
+ $$
67
+ \sigma_{\epsilon_i} = f(\mathbf{x}_i)
68
+ $$
69
+ This demo is an attempt to see how this idea works on several synthetic and real datasets with Heteroskedasticity.
70
+ """)
71
+
72
+ data = st.selectbox("Data", ["Motorcycle", "Olympic", "Linear", 'GPflow'])
73
  if data == "Motorcycle":
74
  data_x, data_y = mcycle_x, mcycle_y
75
  elif data == "Olympic":
76
  data_x, data_y = oly_x, oly_y
77
+ elif data == "Linear":
78
+ data_x = np.linspace(0,1,99)
79
+ data_y = 3 * data_x + 2 + (np.random.randn_like(data_x) * data_x)
80
  elif data == 'GPflow':
81
  N = 1001
82