Skip to content

Instantly share code, notes, and snippets.

@omairaasim
Created September 1, 2019 17:45
Show Gist options
  • Save omairaasim/dd43447641f43d28250b60e1e84cbf91 to your computer and use it in GitHub Desktop.
Save omairaasim/dd43447641f43d28250b60e1e84cbf91 to your computer and use it in GitHub Desktop.
project_1_step_5_visualize_training
# 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