Varun-L commited on
Commit
7b3cca0
·
1 Parent(s): ebc00c3

update description

Browse files
Files changed (2) hide show
  1. algo.py +3 -1
  2. app.py +6 -5
algo.py CHANGED
@@ -9,6 +9,7 @@ The tool takes various inputs such as age, gender, and specific health indicator
9
  <p>The project was led by Principal Investigator <b>Dr. Kanipakam Sunitha,</b> Assistant Professor at the Dept. of Law, SPMVV, Tirupati, and Co-Principal Investigator <b>Dr. N.V. Muthu Lakshmi,</b> Assistant Professor at the same institution. The project received financial support from the DST-CURIE-AI Center.</p>
10
 
11
  <h2>Description</h2>
 
12
  <p>The initial dataset used for the project contained various features such as gender, age, parental education, hearing loss percentage, and several health indicators. The data was cleaned, unnecessary columns were removed, and categorical data was converted to numeric for model training. Multiple regression techniques were tested, including linear regression, decision trees, random forest, Lasso regression, and Support Vector regression. Lasso regression performed the best, achieving a maximum accuracy of 87%.</p>
13
 
14
  <p>The tool is designed to be user-friendly, with a simple interface for inputting information and receiving the risk assessment and recommendations. It serves as a valuable resource for assessing hearing health risks and taking necessary precautions or treatments. However, it's important to consult with a healthcare professional for a comprehensive evaluation. This tool is intended to supplement, not replace, professional medical advice.</p>
@@ -23,7 +24,8 @@ article = r"""
23
  If our work is beneficial for your research, please consider citing:
24
  ```bibtex
25
  @article{VLHearingHealthAssessmentTool,
26
- title={Hearing Health Assessment Tool: A Tool for Assessing the risk of hearing loss based on various health indicators},
 
27
  author={Dr. Kanipakam Sunitha and Dr. N.V. Muthu Lakshmi},
28
  year={2024}
29
  }
 
9
  <p>The project was led by Principal Investigator <b>Dr. Kanipakam Sunitha,</b> Assistant Professor at the Dept. of Law, SPMVV, Tirupati, and Co-Principal Investigator <b>Dr. N.V. Muthu Lakshmi,</b> Assistant Professor at the same institution. The project received financial support from the DST-CURIE-AI Center.</p>
10
 
11
  <h2>Description</h2>
12
+ <p>The data set was collected from the children who are suffering from hearing impaired and taking training at special school. Children are from different areas of Andhra Pradesh and Telangana.</p>
13
  <p>The initial dataset used for the project contained various features such as gender, age, parental education, hearing loss percentage, and several health indicators. The data was cleaned, unnecessary columns were removed, and categorical data was converted to numeric for model training. Multiple regression techniques were tested, including linear regression, decision trees, random forest, Lasso regression, and Support Vector regression. Lasso regression performed the best, achieving a maximum accuracy of 87%.</p>
14
 
15
  <p>The tool is designed to be user-friendly, with a simple interface for inputting information and receiving the risk assessment and recommendations. It serves as a valuable resource for assessing hearing health risks and taking necessary precautions or treatments. However, it's important to consult with a healthcare professional for a comprehensive evaluation. This tool is intended to supplement, not replace, professional medical advice.</p>
 
24
  If our work is beneficial for your research, please consider citing:
25
  ```bibtex
26
  @article{VLHearingHealthAssessmentTool,
27
+ title={A Predictive Model to Find Hearing Loss in Children Using Machine Learning Algorithms},
28
+ description={Hearing Health Assessment Tool: A Tool for Assessing the risk of hearing loss based on various health indicators},
29
  author={Dr. Kanipakam Sunitha and Dr. N.V. Muthu Lakshmi},
30
  year={2024}
31
  }
app.py CHANGED
@@ -21,7 +21,7 @@ X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)
21
  model = Lasso(alpha=0.1,random_state=42)
22
  model.fit(X_train, y_train)
23
 
24
- def predict_hearing_loss(NAME,AGE,GENDER, GENETICAL, MENARIKAM, PROBLEM_PRENATAL, PROBLEM_POSTNATAL, DURING_BIRTH, SIBLINGS_PROBLEM, LEFT_EAR, RIGHT_EAR):
25
  # Create a DataFrame from the inputs
26
  input_data = pd.DataFrame([{
27
  'GENDER': 1 if GENDER == 'Male' else 0,
@@ -45,7 +45,7 @@ def predict_hearing_loss(NAME,AGE,GENDER, GENETICAL, MENARIKAM, PROBLEM_PRENATAL
45
  else:
46
  rec = "Minor hearing loss detected. Keep monitoring the child's hearing and consult a doctor if there are any concerns."
47
 
48
- return prediction[0],rec
49
 
50
  interface = gr.Interface(
51
  fn=predict_hearing_loss,
@@ -66,8 +66,9 @@ interface = gr.Interface(
66
  gr.Textbox(label="Child Identification number"),
67
  gr.Number(label="Age"),
68
  gr.Radio(['Male', 'Female'], label="Gender"),
 
69
  gr.Radio(['Yes', 'No'], label="Any Known Genetic Hearing Loss in Family"),
70
- gr.Radio(['Yes', 'No'], label="Any Consanguineous Marriages in Family (Menarikam)"),
71
  gr.Radio(['Yes', 'No'], label="Any Prenatal Problems Leading to Hearing Loss"),
72
  gr.Radio(['Yes', 'No'], label="Any Postnatal Problems Leading to Hearing Loss"),
73
  gr.Radio(['Yes', 'No'], label="Any Complications During Birth Leading to Hearing Loss"),
@@ -75,8 +76,8 @@ interface = gr.Interface(
75
  gr.Number(label="Left Ear Hearing Loss Severity (in dB)"),
76
  gr.Number(label="Right Ear Hearing Loss Severity (in dB)")
77
  ],
78
- outputs=[gr.Textbox(label="HEARING_LOSS", type="text"),gr.Textbox(label="Recommendation", type="text")],
79
- title="Hearing Health Risk Assessment Tool",
80
  theme="gradio/monochrome",
81
  allow_flagging=False,
82
  css="footer {display: none !important}",
 
21
  model = Lasso(alpha=0.1,random_state=42)
22
  model.fit(X_train, y_train)
23
 
24
+ def predict_hearing_loss(NAME,AGE,GENDER, ES, GENETICAL, MENARIKAM, PROBLEM_PRENATAL, PROBLEM_POSTNATAL, DURING_BIRTH, SIBLINGS_PROBLEM, LEFT_EAR, RIGHT_EAR):
25
  # Create a DataFrame from the inputs
26
  input_data = pd.DataFrame([{
27
  'GENDER': 1 if GENDER == 'Male' else 0,
 
45
  else:
46
  rec = "Minor hearing loss detected. Keep monitoring the child's hearing and consult a doctor if there are any concerns."
47
 
48
+ return round(prediction[0],2),rec
49
 
50
  interface = gr.Interface(
51
  fn=predict_hearing_loss,
 
66
  gr.Textbox(label="Child Identification number"),
67
  gr.Number(label="Age"),
68
  gr.Radio(['Male', 'Female'], label="Gender"),
69
+ gr.Radio(['Poor', 'BPL', 'Middle Class', 'Upper Class'], label="Economic Status"),
70
  gr.Radio(['Yes', 'No'], label="Any Known Genetic Hearing Loss in Family"),
71
+ gr.Radio(['Yes', 'No'], label="Is the parent marriage a Consanguineous Marriage?"),
72
  gr.Radio(['Yes', 'No'], label="Any Prenatal Problems Leading to Hearing Loss"),
73
  gr.Radio(['Yes', 'No'], label="Any Postnatal Problems Leading to Hearing Loss"),
74
  gr.Radio(['Yes', 'No'], label="Any Complications During Birth Leading to Hearing Loss"),
 
76
  gr.Number(label="Left Ear Hearing Loss Severity (in dB)"),
77
  gr.Number(label="Right Ear Hearing Loss Severity (in dB)")
78
  ],
79
+ outputs=[gr.Textbox(label="HEARING LOSS %", type="text"),gr.Textbox(label="Recommendation", type="text")],
80
+ title="A Predictive Model to Find Hearing Loss in Children Using Machine Learning Algorithms",
81
  theme="gradio/monochrome",
82
  allow_flagging=False,
83
  css="footer {display: none !important}",