ANNAS TRI WIDAGDO/PORTFOLIO · 2026
VOL. 01 // TECHNICAL ARCHIVE
■annastriwidagdo.me
SOFTWARE ENGINEER·FULL-STACK WEB DEVELOPER·MACHINE LEARNING ENGINEER
ENTRY 001OPENING TECHNICAL ARCHIVE00% · 01 / 01
Skip to content
■annastriwidagdo.me
  • 01Home
  • 02About
  • 03Projects●
  • 04Blog
  • 05Contact
LANGEN/ID
■annastriwidagdo.me
  • Software Engineer
  • Full-Stack Web Developer
  • Machine Learning Engineer

JAKARTA, INDONESIA · UTC+7

EMAILannastriw6@gmail.com↗ (opens in a new tab)LINKEDIN/in/annastriw↗ (opens in a new tab)GITHUB@annastriw↗ (opens in a new tab)CONTACTOpen Contact→

© 2026 Annas Tri Widagdo. Drafted in grids, shipped in code.

←Back to Projects[INDEX // 06] / EN / PROJECTS / ml-for-heart-attack-risk-prediction
06
●[06 // Machine Learning]

Machine Learning Model for Heart Attack Risk Prediction

  • Python
  • Scikit-learn
  • Pandas
  • SMOTE
  • Joblib
  • Flask
  • Docker
Role
Machine Learning Developer
Verified status
Prototype with deployed inference service
Structured input for the risk-prediction prototype
🔍 Inspect Figure
[COVER]Structured input for the risk-prediction prototype
[01]

Overview

This risk-prediction prototype compares four binary-classification algorithms on 158,355 observations with 21 predictors.

A selected Random Forest model is packaged as a Flask inference service that returns a class, probability, supporting factors, and global feature importance.

Claim boundary

This is a risk-prediction prototype and decision-support experiment, not a clinical diagnosis.

[02]

My Contribution

  • 01Prepared the dataset by encoding five categorical fields and applying MinMaxScaler.
  • 02Created a stratified 80:20 split and applied SMOTE to the training partition only.
  • 03Compared Random Forest, linear SVM, KNN, and Logistic Regression with RandomizedSearchCV focused on F1.
  • 04Serialized the selected artifacts with Joblib and deployed the Flask service through Docker on Ubuntu.
[03]

Key Technical Notes

  • 01The original data contains 158,355 rows, 22 columns, and no missing values.
  • 02The stratified split produced 126,684 training rows and 31,671 test rows before training-only SMOTE balancing.
  • 03Random Forest reached 71.93% accuracy, 64.12% precision, 68.15% recall, 0.6607 F1, and 0.8015 ROC-AUC.
  • 04Logistic Regression produced the highest compared F1 at 0.6618, while KNN produced the highest recall at 70.40%; Random Forest was selected for its leading accuracy and ROC-AUC.
[04]

Visual Evidence

Click to inspect in full resolution
Risk-prediction prototype input evidence
FIG.01Structured patient clinical input submitted to the inference workflow.
Risk-prediction prototype output evidence
FIG.02Inference response showing risk classification and probability output.
[05]

Tech Stack

  • Python
  • Scikit-learn
  • Pandas
  • SMOTE
  • Joblib
  • Flask
  • Docker
[06]

Status & Link

Prototype with deployed inference service

Source repository or production deployment is private.
← Previous projectSIMASTOK SHR Jaya Motor
Back to Projects
Next project →Speech-to-Text System