Skip to content

Trains all players and pulls data for one player and outputs the pred…#15

Open
LalitYemireddy wants to merge 32 commits into
mainfrom
training-player-data
Open

Trains all players and pulls data for one player and outputs the pred…#15
LalitYemireddy wants to merge 32 commits into
mainfrom
training-player-data

Conversation

@LalitYemireddy

Copy link
Copy Markdown
Collaborator

What I changed:

  • Added src/training_player_data/train_one_player.py
  • Implemented a global training pipeline that:
  • Trains on all NBA players instead of a single player
  • Uses rolling window feature engineering
  • Applies log-transform (log1p) to stabilize regression targets
  • Uses mini-batch training via DataLoader
  • Implements early stopping with configurable patience
  • Outputs:
  • Test MAE (in points)
  • Last N-game average baseline
  • Predicted next-game points for a given person_id
  • Added safe handling for early termination (Ctrl+C) to preserve the best model weights

Why I changed it:
The model now improves:

  • Model stability
  • Training efficiency (mini-batching)
  • Generalization (training on 1.27M+ rows)
  • Prediction realism (log-transformed targets + non-negative outputs)

How I tested it:

  • Trained on 1,278,222 rows with 11 rolling features.
  • Verified validation loss decreases during training.
  • Confirmed early stopping works correctly.
  • Verified that stopping training with Ctrl+C still loads the best model and prints results.
  • Use this command to test it out:
    py src\training_player_data\train_one_player.py --person_id 1627739 --window 5
KrisDunnOutput

nidhid11 and others added 27 commits February 18, 2026 01:19
…ormerPredictionModel into training-player-data
…ecked the prediction bug, dropped date feature
…ormerPredictionModel into training-player-data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants