Question: Input: Ir = LinearRegression ( ) # Encapsulate the linear regression model into an object. Ir . fit ( x , y ) # Train

Input:
Ir = LinearRegression() # Encapsulate the linear regression model into an object.
Ir.fit (x,y) # Train the model on the dataset.
Step 4 Visualize the model.
Input:
w= Ir.coef_# Slope of the model
b= Ir.intercept_# Intercept of the model
print('Slope: ',w)
print('Intercept: ',b)
Output:
Slope: [4.98467124]
Intercept: -274.8769665187576
 Input: Ir = LinearRegression() # Encapsulate the linear regression model into

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!