trohith89 commited on
Commit
dbfd064
·
verified ·
1 Parent(s): c5f8e0f

Update pages/4_Model_Creation_and_Evaluation.py

Browse files
pages/4_Model_Creation_and_Evaluation.py CHANGED
@@ -207,7 +207,7 @@ if df is not None:
207
  )
208
 
209
  # Create the best model
210
- st.markdown("## Create the Best Model")
211
  st.markdown("## SVC(kernel='poly', gamma = 'scale', C = 974.1963187644974, degree = 2)")
212
  model = SVC(kernel='poly', gamma = 'scale', C = 974.1963187644974, degree = 2)
213
  st.write(model)
@@ -221,9 +221,9 @@ if df is not None:
221
  y_pred = model.predict(x_test_std)
222
 
223
  # Evaluation metrics
224
- print("Accuracy:", accuracy_score(y_test, y_pred))
225
- print("Classification Report:\n", classification_report(y_test, y_pred))
226
- print("Confusion Matrix:\n", confusion_matrix(y_test, y_pred))
227
 
228
  import streamlit as st
229
  import pandas as pd
 
207
  )
208
 
209
  # Create the best model
210
+ st.markdown("## Create the Model with the best algorithm and parameters you have received by perfroming Hyperparameter Tuning using Optuna")
211
  st.markdown("## SVC(kernel='poly', gamma = 'scale', C = 974.1963187644974, degree = 2)")
212
  model = SVC(kernel='poly', gamma = 'scale', C = 974.1963187644974, degree = 2)
213
  st.write(model)
 
221
  y_pred = model.predict(x_test_std)
222
 
223
  # Evaluation metrics
224
+ st.write(print("Accuracy:", accuracy_score(y_test, y_pred)))
225
+ st.write(print("Classification Report:\n", classification_report(y_test, y_pred)))
226
+ st.write(print("Confusion Matrix:\n", confusion_matrix(y_test, y_pred)))
227
 
228
  import streamlit as st
229
  import pandas as pd