-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Description
The current gaze prediction implementation needs refactoring to improve data leakage prevention, model evaluation consistency, and prediction stability.
Several parts of the pipeline mix training and testing logic, reuse scalers incorrectly, and couple model training logic tightly with prediction code, which makes the system harder to maintain and reason about.
Problems Identified
-
Potential data leakage due to incorrect scaler usage
-
Duplicated model training logic for X and Y predictions
-
Tight coupling between training, prediction, and evaluation logic
-
Accuracy computed per axis only, which does not reflect real spatial error
-
Lack of a single, intuitive metric for comparing model performance
Goals
- Refactor the ML pipeline for clarity and correctness
- Ensure proper train/test separation and scaling
- Centralize and reuse model training logic
- Improve evaluation by introducing Euclidean distance–based accuracy
- Keep prediction outputs backward-compatible
Proposed Changes
-
Refactor model training into a shared helper function
-
Apply
StandardScalercorrectly (fit on train only) -
Simplify prediction logic for X and Y axes
-
Add func_total_accuracy to compute pixel-level gaze error
-
Use total accuracy alongside existing precision metrics