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
LAB: Importing packages
Import the necessary modules and read in a csv file. The homes dataset contains features giving the characteristics of 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.linearmodel package
Read in the csv file homes.csv
Ex: If the csv file homessmall.csv is used instead of homes.csv the output is:
The intercept of the regression is
The slope of the regression is
qxzqy
LAB ACTIVITY
: LAB: Importing packages
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
