Created
September 1, 2019 17:45
-
-
Save omairaasim/725f60f2b830f14234159a891e355736 to your computer and use it in GitHub Desktop.
project_1_step_6_visualize_test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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