This repository is structured to streamline data processing, modeling, and UI integration. Below is an overview of each folder and its purpose.
(This section is currently empty. Fill in with relevant details about the main application.)
(This section is currently empty. Fill in with relevant details about the data processing and structure.)
(This section is currently empty. Fill in with relevant details about data processing scripts and workflows.)
(This section is currently empty. Fill in with relevant details about documentation, videos, and walkthroughs.)
- Source (src):
[batch_size, 22, 66]
- Includes 6 match parameters and 60 player-specific parameters per player.
- Target (tgt):
[batch_size, 22, 66]
- Comprises 15 target parameters expanded to 66 dimensions for alignment.
The model is based on a Transformer architecture, optimized for sequential data. Key components include:
-
Multi-Head Attention
- Captures relationships between players and contextual match features using multiple attention heads.
-
Encoder
- Processes the input sequence (match and player-level features) using stacked attention and feedforward layers.
-
Decoder
- Generates player predictions by applying attention mechanisms to both the target and encoder outputs.
-
Loss Function
- Uses a weighted Mean Absolute Error (MAE) loss:
loss = weighted_mae_loss(prediction, target, lambda_val=10)
- Weights are derived from Dream 11 fantasy points for each performance parameter.
- Higher weight parameters (e.g., wickets, boundaries) are prioritized for accurate predictions.
- Uses a weighted Mean Absolute Error (MAE) loss:
- Match data is structured into
src
(input) andtgt
(output) tensors. - A DataLoader is employed to process batches of size 32.
- Tensors are normalized for efficient training.
- Gradually increases the sequence length of the target (
tgt
) during training. - Computes the loss at each step using the weighted MAE loss function.
- Updates model parameters using the Adam optimizer.
- Saves the trained model weights to a
.pth
file.
- Processes match and player data into appropriate tensor structures.
- Applies the same normalization procedure as in training.
- Outputs are unnormalized to restore the original parameter scales.
- Mean Absolute Error (MAE):
- Computes the MAE between predicted and actual total team points.
- Fantasy Points Evaluation:
- Calculates fantasy points based on 14 predicted performance parameters.
- Sorts players by predicted fantasy points and computes the top-11 total points.
(This section is currently empty. Fill in with relevant details about pre-trained models and artifacts.)
(This section is currently empty. Fill in with relevant details about evaluation data and integration workflows.)
(This section is currently empty. Fill in with details about any miscellaneous requirements.)
model.pt
: ML Model file.api/ml_model.py
: ML model integrated with the Web UI.api/agent.py
: LLM Generative AI integrated feature.api/data
: Stores data for player-to-identifier mapping and player stats.
The Product UI is deployed and accessible at:
http://172.16.4.2:8080
The Product UI can be tested and utilized at the above URL.
- Install dependencies:
pnpm i # or npm i --force
- Start the development server:
pnpm run dev # or npm run dev
- Create and activate a virtual environment:
python -m venv venv venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Apply database migrations:
python manage.py makemigrations python manage.py migrate
- Create a superuser:
python manage.py createsuperuser
- Enter the following details:
- Username: admin
- Email: admin@gmail.com
- Password: 1234
- Update player data:
python manage.py update_players.py
- Update additional data:
python manage.py update_data.py