
Ocean Temperature Regression
Predicts ocean temperature using time-aware validation; tuned Random Forest R² of 0.9707.
Overview
A machine-learning regression study that predicts ocean water temperature using more than six decades of CalCOFI oceanographic measurements. The analysis brings together environmental variables such as depth, salinity, dissolved oxygen, nutrients, location, and time to model changes in temperature. It applies Random Forest regression and time-aware validation, separating later observations from historical training data to reduce temporal leakage. The project emphasizes careful data preparation, credible evaluation, and interpretable environmental prediction, making it a strong example of applied machine learning on real scientific data.
Technical details
The source data contains 864,863 measurements before filtering, with 13 selected predictive features. Rather than a random-only split, observations through 2014 feed five expanding, year-based cross-validation folds and observations from 2015 onward form the held-out test set. Ridge Regression, Decision Trees, Histogram Gradient Boosting, and Random Forest were compared, then selected hyperparameters were refined. The final 150-tree Random Forest (maximum depth 18) achieved a recorded test MAE of 0.4327°C, RMSE of 0.6992°C, and R² of 0.9707.

