Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save FranciscusRenatus/4337cd2f76a9a2d762268b0c327bf3b4 to your computer and use it in GitHub Desktop.
Save FranciscusRenatus/4337cd2f76a9a2d762268b0c327bf3b4 to your computer and use it in GitHub Desktop.
# Visualising the Training set results
plt.scatter(X_train, y_train, color = 'red')
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()
# Visualising the Test set results
plt.scatter(X_test, y_test, color = 'red')
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