Skip to content

Instantly share code, notes, and snippets.

@omairaasim
Created September 1, 2019 17:45
Show Gist options
  • Save omairaasim/725f60f2b830f14234159a891e355736 to your computer and use it in GitHub Desktop.
Save omairaasim/725f60f2b830f14234159a891e355736 to your computer and use it in GitHub Desktop.
project_1_step_6_visualize_test
# Step 6 - Visualize test set results
import matplotlib.pyplot as plt
# plot the actual data points of test set
plt.scatter(X_test, y_test, color = 'red')
# plot the regression line (same as above)
plt.plot(X_train, regressor.predict(X_train), color='blue')
plt.title('Salary vs Experience (Test set)')
plt.xlabel('Years of Experience')
plt.ylabel('Salary')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment