
Design and deploy end-to-end enterprise ML pipelines from raw data to AWS, covering data layer, ML models, MLOps tooling, and a reproducible retrain loop with monitoring.
Explore the tech stack from Python and SQLite to Skylake learn preprocessing for logistic regression and random forest, XGBoost classifiers, and ML ops tooling and data versioning.
Walk through an end-to-end architecture from raw hospital data to production AI predictions, highlighting SQL analytics, feature engineering, model evaluation, MLflow and DVC, and AWS EKS deployment.
Unpack a GitHub strategy for an end-to-end enterprise ML system from raw CSV files to AWS Kubernetes deployment, detailing architecture, data flow, and branch-by-branch live coding workflow.
Walk through the healthcare ai ml pipeline from data versioning and environment setup to mlflow deployment and the production layer, including drift monitoring and logs.
watch a healthcare project demo building a radio UI app from scratch with risk and claim prediction, showing risk scores and prediction status.
Learn to transform raw csv data into a relational model using a SQL database, linking patients, visits, and billing, and perform operational and financial analytics for ML-ready features.
Analyzes the patients.csv master registry of 5,000 records, outlining patient IDs, age, gender, city distribution, insurance providers, chronic flags, and registration dates to enable fairness-aware MLOps and billing insights.
Explore the visits dataset from visits.csv, with 25,000 rows linking patients to visits in a one-to-many structure, using a chronological train-test split and length of stay as a key feature.
Explore the billing dataset, linking visit and billing records via visit_id, analyzing billed_amount and approved_amount with missing values, and predicting claim_status and payment days.
Construct a relational model of patients, visits, and billing in EMR systems, using a three-table join and one-to-many, one-to-one relationships to support ML targets like risk score and claim status.
Launch a structured healthcare project in VS code by organizing folders data, db, notebooks, source, api, models, and outputs, and adding docker, requirements, readme, and a ncicd github workflow.
Set up a requirements.txt with pandas, NumPy, scikit-learn, and XGBoost, including imbalanced-learn. Track experiments with MLflow, version data with DVC, and deploy APIs via FastAPI and uvicorn.
Install dependencies quickly using the uv package manager, create and activate a uv virtual environment, and install a requirements.txt with uv pip install -r requirements.txt, highlighting speed and parallel resolution.
Load raw healthcare csv data including patients.csv, visits.csv, and billing.csv using pandas, verify shapes, and build a SQLite pipeline toward machine learning-ready workflows.
Create and connect to a SQLite database, ensure the db folder exists, and load data frames into SQLite tables for patients, visits, and billing, with index handling and verification.
Preview tables with pandas read_sql in a Python notebook, write quick SQL queries from patients, limit 3 rows, using a connection object, and validate data before switching to native queries.
Execute a department workload analysis with SQL to compute total visits, average and max length of stay hours, and high risk visits, grouped by department for hospital resource planning.
Establish a baseline for healthcare operations and finance analytics, analyze department workloads and high-risk visits, and design ml pipeline to predict billing rejections and improve revenue realization.
Assess data quality checks to interpret business meaningful nulls, detect duplicates and orphans, ensure referential integrity with joins, validate los and payment fields, and ready data for ml.
Join patients, visits, and billing into one flat, denormalized table for ML, extract X features and Y targets, and export as model_table.csv (25k rows, 20 columns) while closing the connection.
Explore the eda philosophy from data scientist and architect perspectives, answering four questions before modeling: meaningful labels, class imbalance, real signal features, and outliers, including healthcare implications.
Set up a Python data science environment, import pandas, numpy, matplotlib, and sklearn, load a CSV model table, convert date fields to datetime with error handling, and inspect with describe.
Analyze distribution and missing value patterns, distinguish business logic from data errors, and examine key columns like approved amount, payment days, and length of stay hours to validate data quality.
Apply business logic validation to ensure data makes business sense before modeling, flagging issues like paid claims with no approved amount and missing payment days by claim status.
Explore distribution analysis of categorical columns using value counts, then visualize department, visit type, insurance provider, and city with count plots and sorted bars.
Learn to read histograms of age and length of stay, apply bins and kernel density estimates, and identify skew, outliers, and interquartile range upper fence using the 1.5 multiplier rule.
Apply box plots and the interquartile range to detect outliers in build amount, payment days, and length of stay hours. Use domain knowledge to ignore negative outlier bounds.
Encode target variables into numeric scores and use a Pearson heat map to reveal correlations among age, length of stay hours, build amount, payment days, and risk numeric.
Balance data to address class imbalance and prevent biased predictions. The lecture demonstrates a naive model, a two-feature logistic regression, and class-weight balancing, with precision, recall, and F1 explained.
Create seven new features via feature engineering to capture patient behavior, provider patterns, and seasonality, including visit frequency, average LOS per patient, rejection rates, and high-cost visit flags.
Explore correcting data quality and audited labels to dramatically boost model performance, from creating a corrected phase one dataset to enriched features and balanced accuracy improvements.
From the business problem, select features like visit frequency, average logs per patient, days since registration, and provider rejection rate, while preventing data leakage and validating impact on model performance.
Develop healthcare machine learning models from a model table csv, moving from sql analysis and eda to training and saving models: visit risk classification and claim outcome prediction with joblib.
Explore building a sklearn pipeline for numeric and categorical features with imputation and one-hot encoding, and compare logistic regression, random forest, and gradient boosting with hyperparameter tuning.
Select time-based features to predict a three-class risk score (low, medium, high) at patient visits. Build and split data to prevent leakage, using known visit-date features and a robust pipeline.
perform a time-based train/test split by sorting the risk dataframe chronologically by visit date, resetting the index, and using a split index to define train and test sets.
Build a preprocessing pipeline that imputes numeric data with the median and categorical data with the most frequent value, then one-hot encodes and integrates via a column transformer into model.
Explore how random forest ensembles capture nonlinear interactions by combining 200 decision trees, using max depth 8 and thoughtful sampling rules, to balance accuracy and recall.
Explore how to implement an XGBoost model by encoding categorical risk scores with a label encoder, converting high, low, and medium into numerical labels for gradient boosting.
Explore how an XGBoost classifier with multi softmax handles three classes, high, low, and medium, using an 80/20 train-test split, with 99% training and 95% test accuracy.
Learn hyperparameter tuning concepts, including grid search CV and randomized search CV, with f1 weighted optimization, and why time-based splits may negate tuning gains for strong baselines.
Compare model a and model b for predicting claim outcomes (paid, pending, rejected) before submission, using billing-date time split, and prevent leakage by excluding approved amount and payment dates.
Define claim features and prepare the data frame with claim target and billing date, perform feature engineering, drop targets, and prepare for class balancing.
Analyze claim status distribution using value counts and percentage normalization, print the distribution for pending and rejected statuses, and plan a time-based split for the claim model.
Apply time-based splitting on the billing date to predict claim outcomes, creating 80/20 train-test splits from a claim data frame, preparing features and targets, and building the pre-processing pipeline.
Develop a pre-processing pipeline that keeps training and production data clean and consistent, prevents data leakage, and applies numeric imputation with median and categorical one-hot encoding with unknown handling.
Build and evaluate a logistic regression baseline model using a pipeline with preprocessor and classifier, training, predicting, and measuring accuracy, f1 score, and the confusion matrix for claim outcomes.
Compare logistic regression, random forest, and XGBoost to assess training versus test accuracy and overfitting, and highlight data gaps for predicting insurer claim outcomes in MLOps.
Save model artifacts by serializing the entire pipeline with joblib, including pre-processing and trained random forest models, plus a feature schema json for fast API inference.
Explore how MLflow enables MLOps with experiment tracking, a model registry for versioning, and reproducible runs. Track parameters, metrics, artifacts, and run IDs from staging to production.
Install MLflow locally, highlighting its open-source status and native integration with scikit-learn and XGBoost. Ensure MLruns reside in the healthcare folder before launching the UI.
Learn how to launch MLflow UI, set up development work, and prepare production with model registry and security, while MLflow DB tracks experiments, prompts, and telemetry through the AI gateway.
Set up machine learning experiment tracking with mlflow, configure tracking URI to the project root, and create a healthcare risk classification experiment with a .gitignore file for clean commits.
Load saved models with joblib, import pandas and warnings, and compute accuracy, f1, and recall scores; verify risk_rf_model and claim_model load correctly before loading the dataset.
Load the data set with a data frame using read_csv, parse dates into date time, and verify the processed data’s shape. Next, move to feature engineering with the feature schema.
Load the feature schema from feature_schema.json, define risk features, claim features, risk target, and claim target, and print a message to verify the loaded schema.
Perform time-based splits for risk and claim by creating dataframes and using visit date and billing date to define train and test sets, aligning features and targets for MLflow workflows.
Log risk and claim models with MLflow, tracking random forest runs, parameters, and metrics like accuracy and F1, then compare runs via the UI and access artifacts.
Register the risk RF model with a named version in MLflow, exposing v1 and v2. Use the model URI from model info and move the registered version to staging.
Move the risk model version to staging using an mlflow client, capture the registered model version, and review the model registry details to track progress toward production.
Assess model eligibility for production using accuracy risk and recall thresholds; promote eligible models to production and archive older versions in the registry, ensuring KPI-aligned business metrics.
Load the production risk model from the registry with mlflow.sklearn and fetch the current production version to trace outputs to the exact model deployment.
Deploy and audit a production risk model by logging predictions with the model version, generating a SHA-256 input hash from a sorted JSON payload for auditability.
Build a production-ready MLflow training pipeline by modularizing the project into config, utils, train pipeline, and evaluate, enabling end-to-end flow from data loading to model registry and production deployment. Evaluate risk and claim models against production thresholds, promote eligible models, and log predictions and hashes for audit in MLflow.
Explore how DVC, data version control, keeps data and models out of Git by using a local cache and tiny .dvc pointer files linked to an S3 remote.
Initialize dbc in your project to enable data versioning for datasets and models. Let dbc metadata track and manage large artifacts via remote storage, while git tracks code.
Learn to version datasets with DVC, separating data from code tracked by Git, add data, manage DVC files and .gitignore, and store data in a DVC cache for reproducibility.
Add and version control a models folder with DVC, commit changes with git, and push to a remote repository, coordinating with MLflow for experiments.
Set up a remote storage as the default DVC remote to push and pull datasets and models, then use DVC pool to restore missing cache from the remote.
Execute a dvc pipeline to train the risk model with mlflow, removing standalone models.dvc, creating a train risk stage, and tracking outputs like model table csv and features schema json.
Start the mlflow server, run the dbc repro step, and commit changes to create an auditable, reproducible pipeline log with exact input and output hashes and a command snapshot.
Create and verify a claim data pipeline with DVC ML, add a claim stage, run DVC repro, and inspect DVC DAG and logs to confirm production readiness.
Verify dvc pipelines for risk and claim, ensure data and pipelines are up to date with dvc status, and enable reproducible steps from source to production via mlflow.
Trace the end-to-end MLOps flow from DVC-driven training to MLflow model registry, staging, and production promotion, ending with FastAPI loading models from the production registry.
Explore FastAPI based inference that loads a saved model at startup, validates inputs against a feature schema, predicts risk or claim, and logs predictions for audit and monitoring.
Create a FastAPI app in main.py, add a health endpoint returning a running status, and run uvicorn to verify startup and Swagger UI accessibility.
Create and register risk and claim routers using an API router, define risk status and claim status endpoints, and configure prefixes for risk and claim prediction in the main API.
Restart the server to confirm the RISC module and claim route load correctly, and verify the registered roots and main file are loaded using debugger outputs.
Create risk and claim schemas using pedantic base models, implement client-side validation to catch errors before machine learning models, and define numerical, categorical, and engineered features for risk prediction.
Integrate prebuilt schemas into the router to accept risk and claim prediction request bodies, convert inputs with model dump, and address deprecation and missing body errors in schema validation.
Fix the router by switching endpoints from get to post, validate input against the schema, and verify responses via Swagger, then prepare to implement the service layer.
Build the services layer for ai system design and ml ops by creating a model loader, a predictor service, and risk and claim endpoints that return dummy predictions.
Load machine learning models with joblib by constructing the base directory and model paths. Implement defensive checks and load the risk and claim models from their respective paths.
Connect the predictor and testing by converting input to a data frame, running predictions, and returning structured responses with optional probabilities for risk and claim models, enabling the monitoring layer.
Learn to wrap a FastAPI API with a Gradio UI using GridUI to create a two-way data flow between user input and model prediction, including confidence and model version.
Install required packages from the requirements.txt and launch three services—MLflow, Gradio UI at 7860, and FastAPI at 8000—explaining the flow of Gradio requests to FastAPI and JSON predictions.
Implement a Gradio app that wires a two-tab UI for risk and claim predictions to a FastAPI backend at 127.0.0.1:8000, sending JSON payloads and displaying the predicted results.
Debug the Gradio app in real time by inspecting API responses and payloads, resolving mismatches, and plan an enterprise ml flow pipeline with UI-agnostic design.
Describe a clean prediction logging flow from a user request through fast API to model prediction, logging prediction details, and using drift monitoring to trigger potential retraining.
Create a monitoring logger in a new logger.py that writes JSON-formatted log entries to predictions.log, recording timestamp in UTC ISO format, model name and version, input data, and the prediction.
Connect the logging to the predictor, log predictions with risk model name and version, capture input data and the prediction, and test with swagger or postman.
Hash inputs before logging to securely mask data, while fetching risk and claim model versions and stages via MLflow, and wiring model name and version into the predictor.
Understand the population stability index (psi) to detect data drift between training data and current patient visits, interpret thresholds, and trigger retraining within an MLOps feedback loop.
Understand the ml ops feedback loop with drift monitoring that compares incoming request distributions to training data, triggering alerts or training and promoting new v2 models via mlflow to production.
Implement drift monitor to compare training baseline data with production data using the population stability index (psi); load baselines, build production distributions, detect drift, and trigger retrain recommendations.
Containerize artifacts and package them for cloud deployment by building docker images with code, models, dependencies, and feature schemas, test locally with /predict/risk and /predict/claim, then deploy on AWS EKS.
Configure the Gradio file for dockerized deployment by using Docker Compose environment variables, set a 30-second timeout, and bind to 0.0.0.0 on port 7860 for external access.
Learn to create a Dockerfile for an API using Python 3.11 slim, set working directory, install requirements, copy assets, expose port 8000, and run uvicorn on host 0.0.0.0 for deployment.
Create a Gradio app, copy the UI assets, expose port 7860, and run the app with Python radio_app.py, preparing setup for a docker compose workflow.
Change the model loader to load from a local file instead of the MLflow registry. Enable offline docker use by loading saved models from the models directory.
Create a docker compose file to orchestrate api and frontend services, specify build context and docker files, map ports 8000 and 7860, and manage startup order in detached mode.
Docker compose demo runs an API and radio in containers, checks health on ports, shows prediction probabilities for high, medium, and low, with a pending claim before pushing to AWS.
Create an ECR registry and repository for the health care API, then install and configure the AWS CLI to log in and push Docker images to AWS.
Tag and push docker images to aws ecr by tagging api and radio images with the correct uri, logging in, and pushing to the repository.
AI System Design & MLOps: From Raw Data to AWS Kubernetes (End-to-End Project)
Stop Learning Machine Learning in Isolation
Most machine learning courses focus on building models in isolation. You train a model, evaluate accuracy, and consider the job done.
But in real-world systems, that is only a small part of the problem.
Organizations do not need models. They need systems that can:
ingest and process real-world data
generate reliable predictions
serve those predictions through APIs
monitor performance over time
adapt when data changes
This course is designed to bridge that gap.
The Story Behind This Capstone
Imagine a large hospital network handling thousands of patients every day.
Patients arrive with different conditions. Some cases are routine, while others escalate into high-risk situations requiring immediate attention. At the same time, every visit generates billing records, which are later submitted to insurance providers. Some claims are approved quickly, while others are delayed or rejected, leading to revenue loss and operational inefficiencies.
Now consider the questions hospital leadership is asking:
Can we identify high-risk patient visits early so that resources can be allocated proactively?
Can we predict which claims are likely to be rejected before they are submitted?
Can we continuously monitor the system and adapt when patient patterns or insurance behaviors change?
These are not just modeling questions. They require a complete, well-designed system.
In this course, you will build that system from the ground up.
What You Will Build
You will design and implement a complete healthcare AI platform that includes:
1. Data Layer
You will start with raw datasets such as patients, visits, and billing records. Instead of working directly on CSV files, you will create a structured analytics layer using SQL, ensuring that data can be queried, validated, and joined properly.
You will then perform exploratory data analysis and build meaningful features such as visit frequency, average length of stay, and provider rejection rates.
2. Machine Learning Layer
You will build two real-world models:
A visit risk classifier that predicts whether a patient visit is low, medium, or high risk
A claim outcome predictor that determines whether a claim will be paid, pending, or rejected
You will implement multiple algorithms, including Logistic Regression, Random Forest, and XGBoost, and evaluate them using proper metrics such as precision, recall, and F1 score.
More importantly, you will understand how data quality impacts model performance and how fixing labels can dramatically improve outcomes.
3. MLOps Layer
This is where the system becomes production-ready.
You will integrate:
MLflow for experiment tracking and model versioning
DVC for data versioning and reproducible pipelines
You will define clear artifacts such as trained models, feature schemas, and prediction logs, ensuring that every step in the pipeline is traceable and repeatable.
4. Serving Layer
You will expose your models through a FastAPI-based service with well-defined endpoints for prediction.
You will enforce input validation using Pydantic and build a browser-based interface using Gradio for demonstration purposes.
You will also implement monitoring mechanisms such as PSI-based drift detection to identify when the system starts behaving differently due to changes in incoming data.
5. Cloud Deployment Layer
You will containerize your application using Docker and push images to AWS Elastic Container Registry.
You will then deploy the system on AWS EKS using Kubernetes, enabling scalability, high availability, and zero-downtime updates.
A complete CI/CD pipeline using GitHub Actions will automate build, test, and deployment steps.
6. Continuous Retraining Loop
The system does not stop after deployment.
You will implement a feedback loop where:
predictions are logged
drift is detected
retraining is triggered using DVC pipelines
This ensures that the system continuously improves as new data flows in.
How This Course Connects the Dots
One of the biggest challenges in learning AI and machine learning is fragmentation. You learn SQL in one place, modeling in another, APIs somewhere else, and cloud deployment separately.
This course connects all of these pieces into a single, coherent system.
You will see how:
raw data flows into structured analytics
features feed into models
models are tracked and versioned
predictions are served via APIs
systems are deployed to the cloud
monitoring drives retraining
By the end, you will not just understand individual tools. You will understand how they work together.
Who This Course Is For
This course is ideal for:
software engineers who want to transition into AI/ML systems
machine learning practitioners who want to learn production deployment
backend developers interested in building AI-powered APIs
architects who want to understand end-to-end AI system design
What You Will Walk Away With
By the end of this course, you will have:
built a complete end-to-end AI system
deployed it on AWS using modern cloud practices
implemented monitoring and retraining mechanisms
developed a strong understanding of production-first architecture
More importantly, you will develop the ability to think beyond models and design systems that deliver real business value.
Final Note
This is not a course about isolated concepts. It is about building something that resembles real-world systems.
If your goal is to move from learning machine learning to applying it in production, this course is designed for you.
Production-first architecture is not an advanced topic. It is the standard.