Random Walk Gravity Regression Case Study
Built and validated a regression pipeline that predicts the gravity constant behind a 2D random-walk simulation and exports a competition-style validation file.
Key results
- R² 0.9914
- Best held-out model
- ~1.19%
- Normalized MAE
Case Snapshot
Role
Product-minded implementation: data model, interface behavior, integration path, and maintainable implementation artifacts.
Scope
I created a reproducible notebook and helper Python module, used train/test validation, compared at least four regression approaches, selected a HistGradientBoostingRegressor, and generated the final io25m025_validate.txt file...
Constraints
The project uses local CSV files only and keeps the validation workflow deterministic and inspectable; no external service or credential is required. The submission file was checked for row count, header format, duplicate run...
Architecture
Dataset
The training CSV provides labeled simulation features; the validation CSV provides the same feature structure without gravity labels.
Modeling
The Python pipeline prepares features, splits training and test data, evaluates several regressors, and keeps reusable code in a helper module.
Submission
The final artifact is a plain-text validation file with exactly the required header and prediction rows, plus notebook and HTML report output.
Dataset
The training CSV provides labeled simulation features; the validation CSV provides the same feature structure without gravity labels.
Modeling
The Python pipeline prepares features, splits training and test data, evaluates several regressors, and keeps reusable code in a helper module.
Submission
The final artifact is a plain-text validation file with exactly the required header and prediction rows, plus notebook and HTML report output.
Architecture Views
Concise system views summarize the project boundary, deployment path, and data flow without adding implementation claims.
System overview diagram
Dataset
Deployment diagram
Modeling
Data flow diagram
Submission
Technical Decisions
- Feature preparation and reusable helper module for regression experiments
- Comparison of multiple regression models with train/test evaluation
- Final prediction export using the required student-ID naming convention
- Notebook and HTML report documenting the pipeline and model choice
- Validation checks for header, row count, missing values, duplicates, and run_id alignment
Challenges
- The validation set contains features but no labels, so the model must learn the relationship between random-walk behavior and the hidden gravity constant from the labeled training data...
- The project uses local CSV files only and keeps the validation workflow deterministic and inspectable; no external service or credential is required.
- The submission file was checked for row count, header format, duplicate run IDs, missing values, validation-order consistency, and prediction range before packaging.
Lessons Learned
- Best held-out model reached about 1.19% normalized MAE and R² of 0.9914
- Generated a valid io25m025_validate.txt file for the unlabeled validation set
- Packaged code, notebook, HTML report, PDF instruction, and prediction file for submission
Future Improvements
- Keep architecture views aligned with the implementation.
- Keep documentation concise: align README, architecture decisions, and screenshots.