HexCourtVision is an advanced analytics platform aimed at transforming NBA game data into actionable insights, specifically focusing on Dribble Hand-Off (DHO) actions.
backend/
: Django REST framework-based backend.frontend/
: Future user interface for interaction (under development).ml_nba/
: Machine learning, data preprocessing, and visualization modules.notebooks/
: Jupyter notebooks for data analysis and model execution.
git clone https://github.com/dkStephanos/HexCourtVision
cd HexCourtVision
docker-compose up
Transform raw game data into a structured format.
from ml_nba.preprocessing.process_game import process_game
game_df = process_game("20151228SACGSW")
Identify potential DHO actions.
from ml_nba.preprocessing.extract_dho_candidates import extract_dho_candidates
dho_candidates = extract_dho_candidates("20151228SACGSW")
Generate hexmaps to represent player movements.
# Placeholder for hexmap generation code
hexmap = generate_trajectory_image(target_event, target_candidate)
Train and evaluate an SVM classifier.
from ml_nba.classification.train_and_evaluate import train_and_evaluate_svm
results = train_and_evaluate_svm(C=0.75, kernel='poly', test_size=0.3, shuffle=True, n_iterations=None)
Analyse player movements and game patterns.
from ml_nba.clustering.run_clustering import run
run(n_clusters = 8
hex_dir = 'C:\\Users\\Stephanos\\Documents\\Dev\\NBAThesis\\NBA_Thesis\\static\\backend\\hexmaps'
directory = os.fsencode(hex_dir)
image_names = []
images = []
hexmaps = [])
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
This project is licensed under the MIT License - see LICENSE.md for details.