Skip to content

Conversation

@SHASHANKVAMP
Copy link

This PR contains my individual contribution for Week 7–9 (Shashank Samyal).

Summary

Adds my Week 7–9 ML contribution for the Lachesis “Wearables for Seniors” project:

  • Preprocessing with privacy-preserving features (Age bands, BMI handling)
  • XGBoost training + evaluation pipeline (reproducible notebooks + scripts)
  • Saved artifacts (metrics, confusion matrix, feature importances, predictions)

Included

  • notebooks/: pre_processing.ipynb, week9_xgboost.ipynb
  • outputs/: classification_report.csv, confusion_matrix.csv/png, cv_scores.csv,
    feature_importances.csv/png, summary_metrics.csv, label_classes.csv, predictions.csv
  • data/: Final_combined_dataset.csv, legality_ethics_audit_findings.csv, obesity.csv
  • reports/: Obesity_Model_Report.pdf, Geospatial_Tools_Research.pdf
  • scripts/: childhood_obesity_ml.py, run_obesity_model.py

Evidence

Accuracy: 0.8585
CV Mean Accuracy: 0.8665 (±0.0073)
Classes: 7, Features: 25

Author

Shashank Samyal — Week 7–9 pipeline & documentation.

@SHASHANKVAMP SHASHANKVAMP requested review from a team as code owners September 24, 2025 15:32
@github-actions
Copy link

🔒 Security Scan Results

🔒 Security Scan Results
=========================

Bandit Scan Results:
-------------------
Run started:2025-09-24 15:32:54.505546

Test results:
>> Issue: [B101:assert_used] Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
   Severity: Low   Confidence: High
   CWE: CWE-703 (https://cwe.mitre.org/data/definitions/703.html)
   More Info: https://bandit.readthedocs.io/en/1.8.6/plugins/b101_assert_used.html
   Location: ./data_science/shashank_week9_xgboost/scripts/run_obesity_model.py:14:0
13	TARGET = "NObeyesdad"  # e.g., Normal_Weight, Overweight_Level_I, Obesity_Type_I, ...
14	assert TARGET in df.columns, f"{TARGET} not found. Columns: {list(df.columns)}"
15	

--------------------------------------------------
>> Issue: [B113:request_without_timeout] Call to requests without timeout
   Severity: Medium   Confidence: Low
   CWE: CWE-400 (https://cwe.mitre.org/data/definitions/400.html)
   More Info: https://bandit.readthedocs.io/en/1.8.6/plugins/b113_request_without_timeout.html
   Location: ./data_science/voice_assistant/generate_response.py:19:10
18	def get_request(query):
19	    req = requests.get(f'https://www.google.com/search?q={query}')
20	

--------------------------------------------------
>> Issue: [B404:blacklist] Consider possible security implications associated with the subprocess module.
   Severity: Low   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/1.8.6/blacklists/blacklist_imports.html#b404-import-subprocess
   Location: ./data_science/voice_assistant/text_to_speech.py:5:0
4	import os
5	import subprocess
6	# Function to generate a response using our NLP model

--------------------------------------------------
>> Issue: [B607:start_process_with_partial_path] Starting a process with a partial executable path
   Severity: Low   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/1.8.6/plugins/b607_start_process_with_partial_path.html
   Location: ./data_science/voice_assistant/text_to_speech.py:15:4
14	    time.sleep(2)
15	    subprocess.run(['say', response], check=True)
16	

--------------------------------------------------
>> Issue: [B603:subprocess_without_shell_equals_true] subprocess call - check for execution of untrusted input.
   Severity: Low   Confidence: High
   CWE: CWE-78 (https://cwe.mitre.org/data/definitions/78.html)
   More Info: https://bandit.readthedocs.io/en/1.8.6/plugins/b603_subprocess_without_shell_equals_true.html
   Location: ./data_science/voice_assistant/text_to_speech.py:15:4
14	    time.sleep(2)
15	    subprocess.run(['say', response], check=True)
16	

--------------------------------------------------

Code scanned:
	Total lines of code: 1067
	Total lines skipped (#nosec): 0
	Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
	Total issues (by severity):
		Undefined: 0
		Low: 4
		Medium: 1
		High: 0
	Total issues (by confidence):
		Undefined: 0
		Low: 1
		Medium: 0
		High: 4
Files skipped (0):

No critical security issues detected.

The code has passed all critical security checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants