Skip to content

UofT-DSI | LCR - Assignment 2#2

Open
brianna-lowe wants to merge 1 commit intomainfrom
assignment-2
Open

UofT-DSI | LCR - Assignment 2#2
brianna-lowe wants to merge 1 commit intomainfrom
assignment-2

Conversation

@brianna-lowe
Copy link
Owner

UofT-DSI | LCR - Assignment 2

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

I updated the assignment code to correctly implement a multivariable linear regression model. This included splitting the dataset into training and testing sets, fitting the model using all numeric predictors, generating predictions on the test set, and evaluating model performance using RMSPE.

What did you learn from the changes you have made?

Through these changes, I learned how important it is to clearly separate predictors and response variables when working with machine learning models. I also gained a better understanding of how to interpret regression coefficients, including why negative coefficients and intercepts are not necessarily errors. Additionally, I learned how RMSPE is calculated and how implementation details can vary depending on library versions.

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

I considered standardizing the predictor variables and encoding categorical features, but decided against it to stay aligned with the scope of the assignment and focus on core linear regression concepts.

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

One challenge was debugging errors caused by passing incorrect objects into the prediction and evaluation functions. I resolved this by carefully tracing variable usage and ensuring consistent data structures. Another challenge was a compatibility issue with the mean_squared_error() function, which I addressed by manually computing the square root of the mean squared error.

How were these changes tested?

I tested the changes by examining the fitted model’s coefficients, verifying that predictions ran successfully on the test set, and confirming that the RMSPE value was reasonable and non-negative. I also checked data dimensions and reproducibility using a fixed random state.

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

N/A

Checklist

  • [ Yes ] I can confirm that my changes are working as intended

Copy link

@fyellow fyellow left a comment

Choose a reason for hiding this comment

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

Good work! You have finished all the requirements

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