Merged
Conversation
anjali-deshpande-hub
approved these changes
Dec 5, 2025
anjali-deshpande-hub
left a comment
There was a problem hiding this comment.
Well done!
Just one observation: this PR should only contain updates to assignment_2.ipynb. In the future, please include only the changes relevant to the PR.
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.
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
I am adding and/or replacing existing code to fit a multivariable linear regression model (mlm) on a provided dataset. Specifically, I am inspecting the dataset structure, responding to a few conceptual questions in markdown, splitting the dataset into train and test sets, fitting an mlm, predicting the mpg for each row in the dataset using the test data, and finally, assessing the mlm prediction test error using the Root Mean Squared Prediction Error (RMSPE) measure to determine the average prediction accuracy in the test set.
What did you learn from the changes you have made?
I learned how to execute simple scikit-learn code to fit a multivariable linear regression model on a training set using Python and evaluate the model on test data.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Not for this assignment.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
I got stuck in two places:
a) I needed to reiterate my list of predictor (feature) variables throughout my coding "[["cylinders", "displacement", "horsepower", "weight", "acceleration", "model_year"]]", which stumped me initially when I attempted to refer to using an (uninitialized) variable name instead of directly listing them in the DataFrame dataset.
b) I also needed to reread the coding provided for the DataFrame creation step. I initially used the provided "lm" coding instead of "mlm" coding. The error message for the "lm" coding indicated an incorrect array size, suggesting that the code was not generating slope coefficients for all the listed predictor variables. I rechecked the Regression-2 notebook and adjusted my code.
How were these changes tested?
By running the code to obtain error-free (and reasonable) output.
A reference to a related issue in your repository (if applicable)
Checklist