Skip to content

Instantly share code, notes, and snippets.

@Alakhator
Created March 24, 2020 19:27
Show Gist options
  • Save Alakhator/0b7e8df095e6b80e10bdbed29a7fa238 to your computer and use it in GitHub Desktop.
Save Alakhator/0b7e8df095e6b80e10bdbed29a7fa238 to your computer and use it in GitHub Desktop.
X_grid = np.arange(min(X), max(X), 0.01) #this step required because data is feature scaled.
X_grid = X_grid.reshape((len(X_grid), 1))
plt.scatter(X, y, color = 'red')
plt.plot(X_grid, regressor.predict(X_grid), color = 'blue')
plt.title('Truth or Bluff (SVR)')
plt.xlabel('Position level')
plt.ylabel('Salary')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment