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

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)
 Ir = LinearRegression() # Encapsulate the linear regression model into an

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!