Update app.py
Browse files
app.py
CHANGED
@@ -69,6 +69,7 @@ data.target_val = data.load_npy_file('val_target_small.npy')
|
|
69 |
|
70 |
st.header('**Step 4:** Train models')
|
71 |
st.subheader('Train constant prediction model')
|
|
|
72 |
st.code('''const_model = data.target_train.mean(axis = 0)''',language='python')
|
73 |
|
74 |
const_model = data.target_train.mean(axis = 0)
|
@@ -76,6 +77,10 @@ const_model = data.target_train.mean(axis = 0)
|
|
76 |
|
77 |
|
78 |
st.subheader('Train multiple linear regression model')
|
|
|
|
|
|
|
|
|
79 |
st.text('adding bias unit')
|
80 |
st.code('''X = data.input_train
|
81 |
bias_vector = np.ones((X.shape[0], 1))
|
|
|
69 |
|
70 |
st.header('**Step 4:** Train models')
|
71 |
st.subheader('Train constant prediction model')
|
72 |
+
st.latex(r'''\hat{y}=E[y_{limit}]''')
|
73 |
st.code('''const_model = data.target_train.mean(axis = 0)''',language='python')
|
74 |
|
75 |
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))
|