Add 4 new PyTorch tasks for CMPE 258 Homework 1#3
Open
abharathkumarr wants to merge 6 commits into
Open
Conversation
New tasks following pytorch_task_v1 protocol: 1. ridge_lvl1_cv_hyperparam - Ridge Regression with K-Fold CV 2. elasticnet_lvl1_wine_quality - Elastic Net on Wine Quality dataset 3. logreg_lvl5_fashion_momentum - Logistic Regression with Momentum optimizers 4. linreg_lvl5_lr_scheduling - Linear Regression with LR Scheduling All tasks include complete implementation of 9 required functions, mathematical docstrings with formulas, comprehensive error handling, visualization and artifact generation, and self-verification with exit codes. Made-with: Cursor
Made-with: Cursor
7d53f03 to
26f93f5
Compare
Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
Task 1 - Ridge Regression (ridge_lvl1_cv_hyperparam): Implemented ridge regression with manual k-fold cross validation to find best lambda parameter. Used California Housing dataset and tested 7 different regularization values. Final model achieved R2 of 0.58 with lambda=1.0. Task 2 - Elastic Net (elasticnet_lvl1_wine_quality): Built elastic net combining L1 and L2 regularization using gradient descent with soft thresholding. Applied to Wine Quality dataset and achieved 18% feature sparsity, reducing 11 features to 9 active ones. R2 score of 0.40 on test set. Task 3 - Logistic Regression with Momentum (logreg_lvl5_fashion_momentum): Compared 3 SGD variants (vanilla, momentum, Nesterov) on Fashion-MNIST classification. Implemented manual momentum updates and trained for 20 epochs each. Nesterov achieved best accuracy of 84.3% with F1 score of 83.9%. Task 4 - LR Scheduling (linreg_lvl5_lr_scheduling): Implemented linear warmup and cosine annealing learning rate schedule for linear regression on Diabetes dataset. Trained for 200 epochs with LR starting at 0.003, warming up for 10 epochs then decaying. Successfully demonstrated proper LR scheduling behavior. All tasks follow pytorch_task_v1 protocol with required functions and self-verification. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New tasks following pytorch_task_v1 protocol:
All tasks include:
Tasks tested and verified with proper function compliance.