ValueError esperado La matriz 2D obtuvo una matriz 1D en lugar de una regresión lineal de Python

x_train= x_train.reshape(-1, 1)
y_train= y_train.reshape(-1, 1)
x_test = x_test.reshape(-1, 1)
Courageous Copperhead