singhk28
commited on
Commit
•
7deadd5
1
Parent(s):
23cce76
remove redundant code. Update Header. Display msg for classifier.
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ col1, mid, col2 = st.columns([10,1,20])
|
|
22 |
with col1:
|
23 |
st.image('https://images.pexels.com/photos/2599244/pexels-photo-2599244.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1')
|
24 |
with col2:
|
25 |
-
st.markdown("""This tool prepares a machine learning model, using your tabular data, from scratch. The
|
26 |
st.markdown("""---""")
|
27 |
|
28 |
st.markdown(f"**To use this tool**, fill out all the requested fields from top to bottom.")
|
@@ -199,12 +199,6 @@ if uploaded_file:
|
|
199 |
## Display top 10 rows
|
200 |
final_proposed_parameters = proposed_values_to_try[0:10]
|
201 |
|
202 |
-
if len(final_proposed_parameters) == 0:
|
203 |
-
st.write("No parameters could be found for the desired value based on current model. Try collecting additional data or provide a different target value.")
|
204 |
-
else:
|
205 |
-
st.write(final_proposed_parameters)
|
206 |
-
st.download_button(label="Download the Proposed Parameters to Try", data = final_proposed_parameters.to_csv(index=False), file_name='Final_proposed_parameters.csv')
|
207 |
-
|
208 |
if opt_type == 'Maximize it':
|
209 |
st.subheader("Using the trained model to maximize target value:")
|
210 |
generated_preds = generated_predictions.copy()
|
@@ -216,12 +210,6 @@ if uploaded_file:
|
|
216 |
## Display top 10 rows
|
217 |
final_proposed_parameters = generated_preds[0:10]
|
218 |
|
219 |
-
if len(final_proposed_parameters) == 0:
|
220 |
-
st.write("No parameters could be found for the desired value based on current model. Try collecting additional data or provide a different target value.")
|
221 |
-
else:
|
222 |
-
st.write(final_proposed_parameters)
|
223 |
-
st.download_button(label="Download the Proposed Parameters to Try", data = final_proposed_parameters.to_csv(index=False), file_name='Final_proposed_parameters.csv')
|
224 |
-
|
225 |
if opt_type == 'Minimize it':
|
226 |
st.subheader("Using the trained model to minimize target value:")
|
227 |
generated_preds = generated_predictions.copy()
|
@@ -233,28 +221,14 @@ if uploaded_file:
|
|
233 |
## Display top 10 rows
|
234 |
final_proposed_parameters = generated_preds[0:10]
|
235 |
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
|
|
241 |
|
242 |
# ---------------------------------------------------------------------------------------------------------------------- #
|
243 |
# Build Classifier Model
|
244 |
-
|
245 |
-
|
246 |
-
# s = clf.setup(train_data, target = target_col, log_experiment=True, normalize=True, silent= True, experiment_name = 'QD_ML')
|
247 |
-
|
248 |
-
# # Compare Model Performance:
|
249 |
-
# st.subheader("Algorithm Selection")
|
250 |
-
# with st.spinner(text="Finding the best algorithm for your model..."):
|
251 |
-
# best_mod = clf.compare_models()
|
252 |
-
# regression_results = clf.pull()
|
253 |
-
|
254 |
-
# st.balloons()
|
255 |
-
# st.success('Model successfully trained! Here are your results:')
|
256 |
-
# st.write(regression_results)
|
257 |
-
|
258 |
-
# # Print a SHAP Analysis Summary Plot:
|
259 |
-
# st.subheader("SHAP Analysis Summary Plot")
|
260 |
-
# st.pyplot(clf.interpret_model(best_mod))
|
|
|
22 |
with col1:
|
23 |
st.image('https://images.pexels.com/photos/2599244/pexels-photo-2599244.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1')
|
24 |
with col2:
|
25 |
+
st.markdown("""This tool prepares a machine learning model, using your tabular data, from scratch. The tool can be used to quickly determine the performance of various algorithms on your dataset and/or be used to make predictions for various combinations of the provided data to try to obtain a combination that achieves the desired target value (if possible). The tool is currently under active development. **Please direct any bug reports or inquiries to the <a href="http://cleanenergy.utoronto.ca/">clean energy lab at UofT</a>**""", unsafe_allow_html=True)
|
26 |
st.markdown("""---""")
|
27 |
|
28 |
st.markdown(f"**To use this tool**, fill out all the requested fields from top to bottom.")
|
|
|
199 |
## Display top 10 rows
|
200 |
final_proposed_parameters = proposed_values_to_try[0:10]
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
if opt_type == 'Maximize it':
|
203 |
st.subheader("Using the trained model to maximize target value:")
|
204 |
generated_preds = generated_predictions.copy()
|
|
|
210 |
## Display top 10 rows
|
211 |
final_proposed_parameters = generated_preds[0:10]
|
212 |
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
if opt_type == 'Minimize it':
|
214 |
st.subheader("Using the trained model to minimize target value:")
|
215 |
generated_preds = generated_predictions.copy()
|
|
|
221 |
## Display top 10 rows
|
222 |
final_proposed_parameters = generated_preds[0:10]
|
223 |
|
224 |
+
if len(final_proposed_parameters) == 0:
|
225 |
+
st.write("No parameters could be found for the desired value based on current model. Try collecting additional data or provide a different target value.")
|
226 |
+
else:
|
227 |
+
st.write(final_proposed_parameters)
|
228 |
+
st.download_button(label="Download the Proposed Parameters to Try", data = final_proposed_parameters.to_csv(index=False), file_name='Final_proposed_parameters.csv')
|
229 |
+
|
230 |
|
231 |
# ---------------------------------------------------------------------------------------------------------------------- #
|
232 |
# Build Classifier Model
|
233 |
+
if mod_type == "classifier":
|
234 |
+
st.write('Classifier is not currently implemented.')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|