Expected 2D array, got 1D array instead error

Seems, expected dimension is wrong. Could you try:

regressor = SVR(kernel='rbf')
regressor.fit(X.reshape(-1, 1), y)

Leave a Comment