Question
can someone do instruction 1.7 for me?
In [852]: YOU ARE REQUIRED TO INSERT YOUR CODES IN THIS CELL X_for_10_LR - X[1, np.where(np.array([feature_names_X])[] - Sit
Instruction 1.5. Your tasks are 1. Create a Linear Regression model called lr (5 marks) 2. Fit the training data to the model
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Working code implemented in Python and appropriate comments provided for better understanding:

Source code for Instruction 1.7:

# YOU ARE REQUIRED TO INSERT YOUR CODES IN THIS CELL
# Construct a plot, where you will show the regression line for Waist vs Situps, the training data (use blue colour),
# the testing data (use green colour), and the residuals for the testing data.
plt.scatter(X_train, Y_train, color='blue')
plt.scatter(X_test, Y_test,color='green')
plt.plot(X_test, Y_pred, color='green', linewidth=2)

Code and Output Screenshots:

Instruction 1.7 Construct a plot, where you will show the regression line for Waist vs Situps, the training data (use blue co

Hope it helps, if you like the answer give it a thumbs up. Thank you.

Add a comment
Know the answer?
Add Answer to:
can someone do instruction 1.7 for me? In [852]: YOU ARE REQUIRED TO INSERT YOUR CODES...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can someone please just run this on their system and post the screenshot so I can...

    Can someone please just run this on their system and post the screenshot so I can know it works. The .csv file and program are given below, please just run it and provide the screenshot. Also, I am using 3.6 Python in Pycharm. Thanks! Bank_Predictions.csv use a portion of the dataset Bank_Predictions which I have provided below (it is only 10 lines because the actual file has over 1000 lines so here is a small snippet); Number Customer_ID Last_Name Cr_Score...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT