Question: 2 . 1 1 LAB: Importing packages Import the necessary modules and read in a csv file. The homes dataset contains 1 8 features giving

2.11 LAB: Importing packages
Import the necessary modules and read in a csv file. The homes dataset contains 18 features giving the characteristics of 76 homes being sold. The modules will be used with the homes.csv file to perform a linear regression. Linear regression will be covered in a different chapter.
Import the NumPy and pandas packages with the aliases used in this material
Import the function LinearRegression from the sklearn.linear_model package
Read in the csv file homes.csv
Ex: If the csv file homes_small.csv is used instead of homes.csv, the output is:
The intercept of the regression is 249.522
The slope of the regression is 36.758
546386.3959570.qx3zqy7
LAB ACTIVITY
2.11.1: LAB: Importing packages
0/1
main.py
Load default template...
Develop mode
Submit mode
Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box.
Enter program input (optional)
If your code requires input values, provide them here.
Run program
Input (from above)
main.py
(Your program)
Output (shown below)
Program output displayed here

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!