puqi commited on
Commit
ed9b5c4
·
1 Parent(s): 17414a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -37,6 +37,8 @@ data = data_utils(grid_info = grid_info,
37
  input_max = input_max,
38
  input_min = input_min,
39
  output_scale = output_scale)
 
 
40
  data.set_to_v1_vars()''',language='python')
41
 
42
  grid_info = xr.open_dataset('ClimSim_low-res_grid-info.nc')
@@ -71,7 +73,7 @@ data.target_val = data.load_npy_file('val_target_small.npy')
71
 
72
  st.header('**Step 4:** Train models')
73
  st.subheader('Train constant prediction model')
74
- st.latex(r'''\hat{y}=E[y_{limit}]''')
75
  st.code('''const_model = data.target_train.mean(axis = 0)''',language='python')
76
 
77
  const_model = data.target_train.mean(axis = 0)
@@ -80,7 +82,7 @@ const_model = data.target_train.mean(axis = 0)
80
 
81
  st.subheader('Train multiple linear regression model')
82
  st.latex(r'''\beta=(X^{T}_{train} X_{train})^{-1} X^{T}_{train} y_{train} \\
83
- \hat{y}=X^{T}_{train} \beta \\
84
  \text{where } X_{train} \text{ and } X_{input} \text{ correspond to the training data and the input data you would like to inference on, respectively.} \\
85
  X_{train} \text{ and } X_{input} \text{ both have a column of ones concatenated to the feature space for the bias.}''')
86
  st.text('adding bias unit')
 
37
  input_max = input_max,
38
  input_min = input_min,
39
  output_scale = output_scale)
40
+
41
+ # set variables to V1 subset
42
  data.set_to_v1_vars()''',language='python')
43
 
44
  grid_info = xr.open_dataset('ClimSim_low-res_grid-info.nc')
 
73
 
74
  st.header('**Step 4:** Train models')
75
  st.subheader('Train constant prediction model')
76
+ st.latex(r'''\hat{y}=E[y_{train}]''')
77
  st.code('''const_model = data.target_train.mean(axis = 0)''',language='python')
78
 
79
  const_model = data.target_train.mean(axis = 0)
 
82
 
83
  st.subheader('Train multiple linear regression model')
84
  st.latex(r'''\beta=(X^{T}_{train} X_{train})^{-1} X^{T}_{train} y_{train} \\
85
+ \hat{y}=X^{T}_{input} \beta \\
86
  \text{where } X_{train} \text{ and } X_{input} \text{ correspond to the training data and the input data you would like to inference on, respectively.} \\
87
  X_{train} \text{ and } X_{input} \text{ both have a column of ones concatenated to the feature space for the bias.}''')
88
  st.text('adding bias unit')