FranciscoLozDataScience commited on
Commit
a008082
·
1 Parent(s): ad6f947

added classification mettrics to info page

Browse files
Files changed (2) hide show
  1. app.py +22 -3
  2. smoker_cm.png +0 -0
app.py CHANGED
@@ -44,7 +44,7 @@ def load_interface():
44
 
45
  with info_page:
46
  # set title and description
47
- gr.Markdown( #TODO: add information about our project: github, description, model metrics, etc.
48
  """
49
  # Ensemble Classifier for Predicting Smoker or Non-Smoker
50
 
@@ -56,11 +56,30 @@ def load_interface():
56
  Our project focused on creating a classifier for a Kaggle dataset containing bio-signals and information on individuals' smoking status. The classifier aims to identify whether a patient is a smoker based on 22 provided features. You can find the dataset [here](https://www.kaggle.com/datasets/gauravduttakiit/smoker-status-prediction-using-biosignals?resource=download&select=train_dataset.csv).
57
  We developed an Ensemble Classifier with Soft Voting, which combines KNN, SVM, and XGBoost classifiers.
58
 
 
 
 
59
  ## Classifier Metrics
60
 
61
- TODO: insert the classification report and confusion matrix
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
- ## Report
64
  For more details about our Ensemble Classifier and the individual models, please refer to our Jupyter notebooks in our project repository.
65
  [DSC 478 Project Repo](https://github.com/msoria17/dsc478-project)
66
  """
 
44
 
45
  with info_page:
46
  # set title and description
47
+ gr.Markdown(
48
  """
49
  # Ensemble Classifier for Predicting Smoker or Non-Smoker
50
 
 
56
  Our project focused on creating a classifier for a Kaggle dataset containing bio-signals and information on individuals' smoking status. The classifier aims to identify whether a patient is a smoker based on 22 provided features. You can find the dataset [here](https://www.kaggle.com/datasets/gauravduttakiit/smoker-status-prediction-using-biosignals?resource=download&select=train_dataset.csv).
57
  We developed an Ensemble Classifier with Soft Voting, which combines KNN, SVM, and XGBoost classifiers.
58
 
59
+ - **non-smoker** = 0
60
+ - **smoker** = 1
61
+
62
  ## Classifier Metrics
63
 
64
+ ### Classification Report
65
+
66
+ Train Accuracy: 0.7833977837414656
67
+ Test Accuracy: 0.7885084006669232
68
+
69
+ precision recall f1-score support
70
+
71
+ non-smoker 0.83 0.84 0.83 4933
72
+ smoker 0.72 0.69 0.71 2864
73
+
74
+ accuracy 0.79 7797
75
+ macro avg 0.77 0.77 0.77 7797
76
+ weighted avg 0.79 0.79 0.79 7797
77
+
78
+ ## Confusion Matrix
79
+
80
+ ![](file/smoker_cm.png)
81
 
82
+ ## Final Report
83
  For more details about our Ensemble Classifier and the individual models, please refer to our Jupyter notebooks in our project repository.
84
  [DSC 478 Project Repo](https://github.com/msoria17/dsc478-project)
85
  """
smoker_cm.png ADDED