Week 3- Friday

Implementation of multiple linear regression, continued..
After encoding the data, I divided the data into training and test set using train_test_split from sklearn (test size 0.2) like I did in Simple linear regression. Once I created a muiltiple linear regression model using sklearn’s LinearRegression class, I trained it using the training data for it to learn relationships between the predictors (R&D Spend,Administration,Marketing Spend,State) and the profits. Using the model I made profit predictions on the test data.

So overall, I gained insights into the importance of data preprocessing (encoding categorical data) and application of regression models in real world scenarios.

 

Leave a Reply

Your email address will not be published. Required fields are marked *