{"id":26451050,"url":"https://github.com/srhn45/nba-stats-predictor","last_synced_at":"2026-05-20T03:13:00.320Z","repository":{"id":281754538,"uuid":"946319093","full_name":"srhn45/nba-stats-predictor","owner":"srhn45","description":"Toolset to collect historical NBA data and train a deep learning model to predict future player stats.","archived":false,"fork":false,"pushed_at":"2025-03-11T12:18:26.000Z","size":7998,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T16:40:41.468Z","etag":null,"topics":["basketball","deep-learning","forecasting","lstm","machine-learning","nba","neural-networks","recurrent-neural-networks","tensorflow"],"latest_commit_sha":null,"homepage":"https://srhn45.github.io/nba-stats-predictor/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srhn45.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-11T00:34:20.000Z","updated_at":"2025-03-11T12:22:38.000Z","dependencies_parsed_at":"2025-03-18T16:39:14.404Z","dependency_job_id":null,"html_url":"https://github.com/srhn45/nba-stats-predictor","commit_stats":null,"previous_names":["srhn45/nba-stats-predictor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/srhn45/nba-stats-predictor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srhn45%2Fnba-stats-predictor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srhn45%2Fnba-stats-predictor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srhn45%2Fnba-stats-predictor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srhn45%2Fnba-stats-predictor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srhn45","download_url":"https://codeload.github.com/srhn45/nba-stats-predictor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srhn45%2Fnba-stats-predictor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33244235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T15:49:41.270Z","status":"online","status_checked_at":"2026-05-20T02:00:07.149Z","response_time":356,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["basketball","deep-learning","forecasting","lstm","machine-learning","nba","neural-networks","recurrent-neural-networks","tensorflow"],"created_at":"2025-03-18T16:31:25.461Z","updated_at":"2026-05-20T03:13:00.305Z","avatar_url":"https://github.com/srhn45.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NBA Stats Predictor\n\nA deep learning tool that predicts NBA player statistics using historical data. The model analyzes player career trajectories to forecast future performance on a season-by-season basis.\n\n## 🏀 Features\n\n- **Data Collection**: Automated scraping of NBA player statistics directly from the NBA\n- **Data Processing**: Comprehensive preprocessing including normalization and variable-length sequence preparation\n- **Model Training**: LSTM-based deep learning model for time-series prediction\n- **Statistics Prediction**: Forecasts key player statistics for upcoming seasons\n- **Model Persistence**: Save and load trained models for future use\n\n## Project Structure\n\n```\nnba-stats-predictor/\n├── data/                           # Generated data files\n│   ├── nba_player_stats_*.csv     # Historical player statistics\n│   ├── predicted_*_season.csv     # Model predictions\n│   └── ...                        \n├── scraper.ipynb                  # Web scraping notebook\n├── trainer.ipynb                  # Model training notebook\n├── guesser.ipynb                  # Prediction interface\n├── nba_stats_predictor_model.keras # Saved model (generated)\n└── normalization_params.json      # Model parameters (generated)\n```\n\n## How It Works\n\n1. **Data Collection** (`scraper.ipynb`):\n   - Scrapes historical NBA player statistics\n   - Processes and cleans the raw data\n   - Saves data to CSV format\n\n2. **Model Training** (`trainer.ipynb`):\n   - Preprocesses data for deep learning\n   - Saves preprocessed data to CSV format\n   - Implements and trains LSTM model\n   - Saves trained model and normalization parameters\n\n3. **Predictions** (`guesser.ipynb`):\n   - Loads trained model and parameters\n   - Makes predictions for future seasons\n   - Exports predictions to CSV files\n\n## Getting Started\n\n1. Clone the repository:\n```bash\ngit clone https://github.com/srhn45/nba-stats-predictor.git\ncd nba-stats-predictor\n```\n\n2. Install required packages:\n```bash\npip install tensorflow pandas numpy sklearn\n```\n\n3. Run notebooks in order:\n   - First run `scraper.ipynb` to collect data\n   - Then `trainer.ipynb` to train the model\n   - Finally `guesser.ipynb` to make predictions\n  \n   - Can run `guesser.ipynb` directly with the provided data if not looking to make changes\n\n## Generated Files\n\nThe following files are generated through the notebooks:\n\n- `data/nba_player_stats_*.csv`: Contains scraped NBA statistics\n- `data/predicted_*_season.csv`: Contains model predictions\n- `nba_stats_predictor_model.keras`: Trained model file\n- `normalization_params.json`: Model normalization parameters\n\nNote: All generated files can be recreated by running the notebooks in sequence.\n\n## Future Improvements and Additions\n\n- Further optimize the base model\n- Add player similarity analysis\n- Implement confidence intervals for predictions\n- Add injury history consideration\n- Expand to team-level predictions\n\n  \n- Develop Fantasy Draft AI Bot using predictions\n  - Implement reinforcement learning for optimal draft strategies\n  - Consider league-specific scoring systems\n  - Account for position scarcity and roster construction\n  - Optimize for season-long performance using predicted statistics\n  - Adapt strategy based on draft position\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrhn45%2Fnba-stats-predictor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrhn45%2Fnba-stats-predictor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrhn45%2Fnba-stats-predictor/lists"}