Skip to content

Instantly share code, notes, and snippets.

@panicpotatoe
Last active January 31, 2023 17:43
Show Gist options
  • Select an option

  • Save panicpotatoe/44e66ed4181370769e516fd7bd23e388 to your computer and use it in GitHub Desktop.

Select an option

Save panicpotatoe/44e66ed4181370769e516fd7bd23e388 to your computer and use it in GitHub Desktop.
# Visualizing the Training set results
viz_train = plt
viz_train.scatter(X_train, y_train, color='red')
viz_train.plot(X_train, regressor.predict(X_train), color='blue')
viz_train.title('Salary VS Experience (Training set)')
viz_train.xlabel('Year of Experience')
viz_train.ylabel('Salary')
viz_train.show()
# Visualizing the Test set results
viz_test = plt
viz_test.scatter(X_test, y_test, color='red')
viz_test.plot(X_train, regressor.predict(X_train), color='blue')
viz_test.title('Salary VS Experience (Test set)')
viz_test.xlabel('Year of Experience')
viz_test.ylabel('Salary')
viz_test.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment