Skip to content

UofT-DSI | LCR - Assignment 1#1

Open
zdai399 wants to merge 2 commits intomainfrom
assignment-1
Open

UofT-DSI | LCR - Assignment 1#1
zdai399 wants to merge 2 commits intomainfrom
assignment-1

Conversation

@zdai399
Copy link
Owner

@zdai399 zdai399 commented Nov 24, 2025

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

I added the codes for assignment 1.

What did you learn from the changes you have made?

I learned how to set a random seed, inspect data, splitting data into training and testing sets, fit a KNN model, implementing grid search with cross-validation, fitting model on training data and evaluate model on test set with the best n_neighbors value.

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

I did not think of other approaches.

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

It was difficult figuring out how to split data with response variable but the learning support helped.

How were these changes tested?

They were testing by running the codes multiple times.

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

NA

Checklist

  • I can confirm that my changes are working as intended

Copy link

@PatelVishakh PatelVishakh left a comment

Choose a reason for hiding this comment

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

Assignment 1: Incomplete. Needs a few changes.
Required Changes:

Q1)I) Can use the code “num_observations = wine_df.shape[0]” to access number of observations/rows
Q1)II)Can use the code “num_observations = wine_df.shape[1]” to access number of variables/columns

Q1)III) The type of variable is categorical. In a data science setting, this question is asking whether the variable is continuous or categorial(integer, ordinal are other options).

Q2)IV) need to use predictors_standardized rather than just the predictors. This has caused incorrect models for the 3) and 4)

Q4)I) When using results from other code sections rather then commenting in after manually reading the output, you should automate it. Specifically using best n_neighbors

@zdai399 zdai399 requested a review from PatelVishakh November 27, 2025 18:09
Copy link

@PatelVishakh PatelVishakh left a comment

Choose a reason for hiding this comment

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

Assignment 1: Complete. Great changes!

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