Skip to content

UofT-DSI | LCR - Assignment 2#2

Open
Empress-star wants to merge 4 commits intomainfrom
assignment-2
Open

UofT-DSI | LCR - Assignment 2#2
Empress-star wants to merge 4 commits intomainfrom
assignment-2

Conversation

@Empress-star
Copy link
Owner

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

I've added the code to complete the assignment

What did you learn from the changes you have made?

I was able to practice doing a multivariable linear regression and evaluating it with RMSPE

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

No

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

I had a hard time with creating the numeric_predictors variable, so I ended up using the method shown in assignment one for isolating the predictors into one variable that did not include the response variable or the non-numeric variables. I also had issues when it came time to use the test data, as I tried to make a new variable called numeric_predictors_test and use that the predict() method, but it gave me an error saying that I had to use the same features that were used in the fitting of the model. I ended up redefining the original numeric_predictors variable to use testing data, so I wouldn't have to use a different variable when predicting.

How were these changes tested?

Once completed, I saved and reran all the code blocks

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

Checklist

  • I can confirm that my changes are working as intended

Choose a reason for hiding this comment

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

  1. In Question 3, should split the dataset as train (75%) and test (25%). Having a minority test set reduces the opportunity for the model to learn in the first place.
  2. Also should use select_dtypes() and drop() to select numeric predictors instead of manually choosing predictors based on their position to avoid errors.

Copy link
Owner Author

Choose a reason for hiding this comment

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

I've implemented the fixes, thanks for tips!

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