Skip to content

Commit ce5c548

Browse files
committed
Improved submit form, fixed card at landing page, started readme
1 parent c35584d commit ce5c548

File tree

4 files changed

+28
-16
lines changed

4 files changed

+28
-16
lines changed

Home.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
title="Instructions",
6363
text="How to use the urine strips?",
6464
image="https://i.ibb.co/FVSTQR5/urinetest.jpg",
65-
url="/Instructions",
65+
url="/How_to_take_a_urine_sample",
6666
)
6767

6868
card(

README.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
1-
# Final_project_Uresens
1+
# UreSens: a diagnosis tool to monitor and predict Chronic Kidney Disease
2+
23

34

45
# Model metrics
56
| Auc | Logloss | Aucpr | Mean_per_class_error | RMSE | MSE |
67
| --- | --- | --- | --- | --- | --- |
78
| 0.963173 | 0.202759 | 0.98234 | 0.0626667 | 0.242937 | 0.00185088 | 0.0590182 |
89

10+
H2O provides a variety of metrics that can be used for evaluating models:
911

12+
- **AUC (Are under the ROC curve):** It’s a way of measuring the performance of a binary classifier by comparing the False Positive Rate (FPR x-axis) to the True Positive Rate (TPR y-axis). An AUC of 1 indicates a perfect classifier, while an AUC of .5 indicates a poor classifier, whose performance is no better than random guessing. This is the default measure for the leaderboard.
13+
<br>
14+
- **Logloss:** Logarithmic loss. Measures the performance of a classifier by comparing the class probability to actual value (1 or 0). Unlike AUC which looks at how well a model can classify a binary target, logloss evaluates how close a model’s predicted values (uncalibrated probability estimates) are to the actual target value. Logloss can be any value greater than or equal to 0, with 0 meaning that the model correctly assigns a probability of 0% or 100%.
15+
<br>
16+
- **AUCPR (Area under the Precision-Recall curve):** This model metric is used to evaluate how well a binary classification model is able to distinguish between precision recall pairs or points. The main difference between AUC and AUCPR is that AUC calculates the area under the ROC curve and AUCPR calculates the area under the Precision Recall curve. The Precision Recall curve does not care about True Negatives.
17+
Evaluation metrics for regression models (rmse, mse, …) are also calculated for classification problems.
1018

1119
# Links and Resources
1220

@@ -22,4 +30,6 @@
2230

2331
- H2O tutorial: https://github.com/h2oai/h2o-tutorials/blob/master/h2o-world-2017/automl/Python/automl_binary_classification_product_backorders.ipynb
2432

25-
-MySQL Connector: https://dev.mysql.com/doc/connector-python/en/connector-python-example-cursor-select.html
33+
- MySQL Connector: https://dev.mysql.com/doc/connector-python/en/connector-python-example-cursor-select.html
34+
35+
- Metrics: https://www.mle.hamburg/_repos/dat_sci/11_ml_perf_meas/

pages/Submit your results.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -60,22 +60,25 @@ def run_query(query):
6060

6161
patientid = st.text_input("🧍‍♂️🧍‍♀️ Who are you?*")
6262
if patientid == "":
63-
st.stop()
63+
st.warning("Please input your name", icon="💡")
6464

6565
# Date
6666

6767
date = st.date_input("🗓 Input the current date*")
6868

6969
#Blood pressure
7070

71-
blood_pressure = st.number_input("🩺 Enter your blood pressure value (diastolic):*", 0, 200)
71+
blood_pressure = st.number_input("🩺 Enter your blood pressure value (diastolic):*", 0, 150)
72+
73+
if blood_pressure < 50:
74+
st.warning("Please input a value between 50 and 150", icon="💡")
7275

7376
# Hypertension
7477

7578
hypertension = selectbox("📈 Have you been diagnosed with hypertension?*",
7679
["Yes", "No"])
7780
if hypertension == None:
78-
st.stop()
81+
st.warning("Please select Yes or No", icon="💡")
7982
elif hypertension == "Yes":
8083
hypertension = 1
8184
elif hypertension == "No":

pages/Your medical records.py

+9-10
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,17 @@ def run_query(query):
168168
new_name=["Blood Pressure mm/Hg diastolic", "Albumin (0-5)", "Sugar (0-5)", "Eritrocytes Ok/NOk", "Hypertension Yes/No"]
169169
for i, j in zip(df2.columns, new_name):
170170
rename_columns(df2, i, j)
171-
172-
# Progress bar
173-
latest_iteration = st.empty()
174-
bar = st.progress(0)
175-
num = 10
176-
for i in range(num):
177-
latest_iteration.text(f"Prediction is being initialized. Please wait {num - i} seconds...")
178-
bar.progress((110//num)*i)
179-
time.sleep(0.5)
180-
171+
181172
@st.cache(suppress_st_warning=True)
182173
def prediction(dataframe):
174+
# Progress bar
175+
latest_iteration = st.empty()
176+
bar = st.progress(0)
177+
num = 10
178+
for i in range(num):
179+
latest_iteration.text(f"Prediction is being initialized. Please wait {num - i} seconds...")
180+
bar.progress((110//num)*i)
181+
time.sleep(0.5)
183182
#Connect with H2O
184183
h2o.init()
185184
# Load file

0 commit comments

Comments
 (0)