puqi commited on
Commit
6f3de94
·
1 Parent(s): e9ce882

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -23,6 +23,8 @@ st.code('''from data_utils import *''',language='python')
23
 
24
 
25
  st.header('**Step 2:** Instantiate class')
 
 
26
  st.code('''#Change the path to your own
27
  grid_info = xr.open_dataset('ClimSim_low-res_grid-info.nc')
28
  input_mean = xr.open_dataset('input_mean.nc')
@@ -77,10 +79,10 @@ const_model = data.target_train.mean(axis = 0)
77
 
78
 
79
  st.subheader('Train multiple linear regression model')
80
- st.latex(r'''\beta=(X^{T}_{train} X_{train})^{-1} X^{T}_{train} y_{train}
81
- \hat{y}=X^{T}_{train} \beta
82
- where X_{train} and X_{input} correspond to the training data and the input data you would like to inference on, respectively.
83
- X_{train} and X_{input} both have a column of ones concatenated to the feature space for the bias.''')
84
  st.text('adding bias unit')
85
  st.code('''X = data.input_train
86
  bias_vector = np.ones((X.shape[0], 1))
 
23
 
24
 
25
  st.header('**Step 2:** Instantiate class')
26
+ st.link_button("Go to original grid_info", "https://github.com/leap-stc/ClimSim/tree/main/grid_info",use_container_width=True)
27
+ st.link_button("Go to original input_mean input_max input_min output_scale", "https://github.com/leap-stc/ClimSim/tree/main/preprocessing/normalizations",use_container_width=True)
28
  st.code('''#Change the path to your own
29
  grid_info = xr.open_dataset('ClimSim_low-res_grid-info.nc')
30
  input_mean = xr.open_dataset('input_mean.nc')
 
79
 
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')
87
  st.code('''X = data.input_train
88
  bias_vector = np.ones((X.shape[0], 1))