Skip to content

feat: add mini neural network#7

Merged
JonathanPLev merged 8 commits into
mainfrom
nidhi/mini-NN
Feb 19, 2026
Merged

feat: add mini neural network#7
JonathanPLev merged 8 commits into
mainfrom
nidhi/mini-NN

Conversation

@nidhid11

@nidhid11 nidhid11 commented Dec 3, 2025

Copy link
Copy Markdown
Collaborator

What I changed

  • Created mini NN model
  • Added a training script that includes loading, splitting, training loop, and saving for data preprocessing
  • Added comprehensive unit tests for the model, specifically 4 tests for initialization, forward pass, probabilities, and batch processing
  • Added PyTorch as a project dependency
  • Added project structure under src/neural_network/

Why I changed it

  • Neural network for NBA player performance prediction
  • Uses PyTorch implementation
  • Uses same data preprocessing approach as Random Forest model

How did I test it

  • Wrote 4 unit tests that passed locally
  • Ran ruff check and format to make sure linting and formatting checks pass

Related Issues


Note: The PR title will become the commit message when squash merged, so make sure it follows conventional commit format!

@JonathanPLev

JonathanPLev commented Dec 3, 2025

Copy link
Copy Markdown
Owner

make sure you pass commit convention. I've pushed my neural network code. Could you move yours over to the same folder? it's under src/mini_nn. Also, please consolidate all of the code into one file. You should also be able to discard the pyproject.toml changes and then merge main into your branch to get those updates. That should be the only merge conflict you receive. Also, can you add your results to this PR or make a graph or something else. Curious to know how well your model does.

@JonathanPLev

JonathanPLev commented Dec 3, 2025

Copy link
Copy Markdown
Owner

i believe i fixed the merge conflicts you will just have pull locally to make sure the changes are updated

edit: i think i broke uv.lock. you will have to rebuild it and repush it. preferably dont commit uv.lock at all, if you could delete from the tracking that would be ideal

@JonathanPLev JonathanPLev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you do two more things:

  1. can you put all your files in a subdirectory in src/mini_nn, with your name on it, so we know its your nn
  2. can you put results in your readme so we can see how well your model perfroemd

@JonathanPLev

Copy link
Copy Markdown
Owner

and could you put your actual model into the models folder please, under mini_nn/

@JonathanPLev JonathanPLev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you make sure you fix the PR stuff, and then can you also reset uv.lock to how it was or remove it from your commit, and remove .DS_Store. thank you!

@nidhid11

Copy link
Copy Markdown
Collaborator Author

Nidhi mini-nn

Predicts NBA players beating projected line (over/under) using a neural network

Performance Results

Training Configuration

  • Epochs: 100
  • Batch Size: 32
  • Learning Rate: 0.001

Results

  • Final Validation Accuracy: 52.43%
  • Training Samples: 11190
  • Validation Samples: 2798

Classification Report

         precision    recall  f1-score   support

   Under       0.53      0.54      0.54      1426
    Over       0.52      0.51      0.51      1372

accuracy                           0.52      2798
macro avg       0.52      0.52      0.52      2798
weighted avg       0.52      0.52      0.52      2798

Confusion Matric:

[[768 658]
[673 699]]

Details

  • Framework: PyTorch
  • Data Preprocessing: StandardScaler normalization
  • Regularization: Dropout (30%) + Batch Normalization
  • Data Split: 80% train / 20% validation

@JonathanPLev JonathanPLev left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great. good work!

@JonathanPLev JonathanPLev merged commit 00cc68f into main Feb 19, 2026
5 checks passed
@JonathanPLev JonathanPLev deleted the nidhi/mini-NN branch February 19, 2026 21:21
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.

2 participants