Building Agentic AI Projects for ML Image Classification: XGBoost vs. CNN.
Details
Everyone is building “AI agents” by wrapping a large language model around their code. We tried that too. We wired Claude agent in as the orchestrator of a medical image classification pipeline, tested it, and then deleted it.
What replaced it works better for this job: a deterministic agent that runs the whole pipeline on its own.
- It works out its own plan. Nobody tells it the order of steps; it derives the order from what each skill needs and produces.
- It picks the right tool. When cached features exist for the exact same data, it reuses them instead of recomputing: a 157-second run drops to 77 seconds.
- It handles trouble on its own. It stops on bad data, retries a failed save, and refuses to promote a model that fails its quality gates.
- It logs its reasoning. Every decision is written down with the rule behind it.
And every run, by every route, produces a byte-identical model.
This talk walks through that project end to end: a five-class lung CT-patch classifier (normal, benign granuloma, adenocarcinoma, squamous cell carcinoma, large cell carcinoma), built in Python with OpenCV, scikit-image and XGBoost. It reaches 96.67% test accuracy, 0.998 ROC-AUC and 0.958 MCC.
Then we put it under pressure, with real numbers:
- Five ways to build the same pipeline: a plain script, an agent with skills, a LangGraph version with human approval, an LLM-orchestrated version and the final deterministic agent. Which ones were worth the code, and which were not?
- Deep learning vs. classic ML. A Keras CNN on identical images reached 93.17% after 33 minutes of training. XGBoost reached 96.67% in 10 seconds. Why the “old” method won.
- Can you skip labels? We tried six unsupervised clustering approaches (K-Means, hierarchical, DBSCAN, PCA, autoencoders, Gaussian mixtures). The best agreed with the diagnoses 87% of the time, but missed over a third of one cancer type. What clustering is actually good for in production.
- Real data hits back. On an open lung CT dataset, a careless random split reports 96% accuracy. An honest split by patient reports about 80%. We show how data leakage happens and how to stop it.
- A bug that tests caught. A unit test exposed a silent error in a shape feature (OpenCV traces contours clockwise). We’ll show how a five-line test saved the result.
For more information look at the series of biotech papers at “Artificial Intelligence Applications in Biostatistics, Bioinformatics and Computational Biology by Ernest Bonat, Ph.D.”
You’ll walk away with
- A clear, practical answer to “do I need an LLM for this?”
- A working blueprint for an agent that plans from skill contracts, chooses between skills and recovers from failure, in one Python file
- How to add guardrails and quality gates that stop a weak model from shipping
- How to evaluate a medical classifier beyond accuracy: sensitivity, specificity, ROC-AUC, MCC and calibration
- How to spot and prevent patient-level data leakage
- The full open project: code, tests and paper
This session is intended for AI and machine-learning engineers, data scientists, bioinformaticians, computational biologists, healthcare professionals, biotech researchers, students, educators, and anyone interested in practical applications of Generative AI and GraphRAG.
Who should attend:
AI/ML engineers, data scientists, bioinformaticians, software developers, healthcare technology professionals, researchers and students. If you are building with AI, or deciding whether you should, this session will save you time. No prior experience with agents or medical imaging is needed. Bring your questions: the live demo runs the agent from scratch and shows every decision it makes.
Agenda:
· 5:30 – 6:00 pm: Networking and refreshments
· 6:00 – 6:10 pm: Welcome!
· 6:10 – 7:30 pm: Presentation and open discussion
· 7:30 – 8:00 pm: Networking
Location: Entrepreneur Collaborative Center, 2101 East Palm Avenue, Tampa, FL 33605
Parking: Free parking is available in the lot directly north of the ECC building. Please do not park immediately adjacent to the facility.
RSVP: Seating is limited — please RSVP early. If you're bringing a guest, have them RSVP separately so we can plan accordingly.
Speakers:
Ernest Bonat, Ph.D. — is a Senior AI Engineer who builds machine learning systems and AI assistants for biostatistics, bioinformatics, computational biology and healthcare. He writes about applied AI in the life sciences at ernest-bonat.medium.com.
