Skip to content

UofT-DSI | LCR - Assignment 1#1

Open
alanmj950 wants to merge 1 commit intomainfrom
assignment-1
Open

UofT-DSI | LCR - Assignment 1#1
alanmj950 wants to merge 1 commit intomainfrom
assignment-1

Conversation

@alanmj950
Copy link
Owner

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

I was adding the code for the assignment tasks, such as inspecting the dataset, standardizing the predictors, splitting the data, tuning the hyperparameters with grid search, and finally evaluating the KNN model.

What did you learn from the changes you have made?

I learned how important preprocessing is before fitting a model, especially standardization for KNN. I also learned how to use grid search with cross-validation to find the best number of neighbors and how to properly check the model’s accuracy on a test set.

Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?

At first, I thought about just picking a random number of neighbors instead of running grid search, but I realized that cross-validation gives a more reliable way to choose the best value.

Were there any challenges? If so, what issue(s) did you face? How did you overcome it?

One challenge was understanding why we standardize the predictors but not the response variable. At first, I thought everything should be scaled, but after reading more and testing, I understood that the class labels are categorical and should not be transformed.

How were these changes tested?

I tested the changes by running the notebook and checking that the outputs matched what I expected, like the number of rows and columns, the best k value from grid search, and the accuracy score on the test data.

A reference to a related issue in your repository (if applicable)

N/A

Checklist

  • I can confirm that my changes are working as intended

@efantinatti
Copy link

Hi Alan

PR Feedback Report

Student: Alan
GitHub Username: @alanmj950
PR Number: 1
Branch: assignment-1
Status: COMPLETE
PR URL: #1

What You Did Well (Hits)

You successfully completed all parts of the assignment. Data inspection was accurate, standardization and data splitting were correctly implemented, and the grid search for the best n_neighbors value was performed as required. The model evaluation also yielded the expected accuracy. The pull request was on the correct branch.

Areas for Improvement (Errors)

None

Advice and Recommendations

Consider adding comments to your code to explain each step, especially for complex operations. This improves readability and maintainability. Also, ensure all variables are defined before use to avoid runtime errors.

Overall Assessment

Excellent submission. All requirements were met with accurate results and good explanations.

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