Created
September 1, 2019 17:45
-
-
Save omairaasim/dd43447641f43d28250b60e1e84cbf91 to your computer and use it in GitHub Desktop.
project_1_step_5_visualize_training
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 5 - Visualize training set results | |
import matplotlib.pyplot as plt | |
# plot the actual data points of training set | |
plt.scatter(X_train, y_train, color = 'red') | |
# plot the regression line | |
plt.plot(X_train, regressor.predict(X_train), color='blue') | |
plt.title('Salary vs Experience (Training 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