Last active
June 28, 2020 03:10
-
-
Save codeperfectplus/f4a0e148460f95cf7a0040eafe883aea to your computer and use it in GitHub Desktop.
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
## Comparing the Test Set with Predicted Values | |
df = pd.DataFrame({'Real Values':test_y,"Predict Value":predicted_y}) | |
df.head() | |
## Step 6: Visualising the Test set results | |
plt.scatter(test_X, test_y, color = 'red') | |
plt.scatter(test_X, predicted_y, color = 'green') | |
plt.plot(train_X, lr.predict(train_X), color = 'black') | |
plt.title('Salary vs Experience (Result)') | |
plt.xlabel('YearsExperience') | |
plt.ylabel('Salary') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment