Skip to content
md ~/projects/beyin-agirligi-tahmini
Project archive

2026Live

Brain Weight Prediction

  • Python
  • scikit-learn
  • pandas
  • NumPy
  • SciPy
  • JavaScript
  • SVG
  • pytest
  • Vercel

Overview

A web calculator that predicts adult brain weight from head size with a 95% prediction interval. Five regression models were compared with repeated cross-validation; the chosen model runs in the browser with no server.

01 · Problem

Brain weight cannot be measured in a living person; can it be predicted from head size, and how far can the prediction be trusted? The first version presented the data as "baby brain weight", but it comes from 237 adults measured in 1905. Its score came from one lucky split and its predictions had no error margin.

02 · Solution

I built a Python pipeline that validates the data and compares five models (linear, polynomial, Ridge, Random Forest) and a baseline on the same 50 cross-validation splits. The one-standard-error rule picks the simplest model, and its coefficients are exported to JSON together with the matrices the prediction interval needs. A library-free website computes the prediction and the 95% interval in the browser and draws them on graph paper; shared tests prove that Python and JavaScript give the same result.

03 · Outcome

Repeated cross-validation gives a mean error of 56.7 g and R² 0.60, an honest measure instead of the 0.66 the old version reported from one split. The result is a live, serverless calculator in Turkish and English that warns about values outside the data; personal data that the old version had left in the public repository was removed from the git history.

Brain Weight Prediction – Python Machine Learning Project | Miraç Deprem