Question: why won't this run ` ` ` x = df [ [ ' x ' ] ] y = df [ [ ' y '

why won't this run
```
x = df[['x']]
y = df[['y']]
x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.2, random_state=42)
model = LinearRegression()
model.fix(x_train, y_train)
y_pred = model.predict(x_test)
print("cooefficients:", model.coef_)
print("intercept:", model.intercept_)
```
why won't this run ` ` ` x = df [ [ ' x ' ] ] y =

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 Programming Questions!