Update classification_template.py#2
Open
rahulverma7788 wants to merge 1 commit intosrafay:masterfrom
rahulverma7788:patch-1
Open
Update classification_template.py#2rahulverma7788 wants to merge 1 commit intosrafay:masterfrom rahulverma7788:patch-1
rahulverma7788 wants to merge 1 commit intosrafay:masterfrom
rahulverma7788:patch-1
Conversation
srafay
requested changes
Jan 19, 2020
Owner
srafay
left a comment
There was a problem hiding this comment.
Please answer on the comments below.
| plt.legend() | ||
| plt.show() | ||
|
|
||
| X1, X2 = np.meshgrid(np.arange(start = X_set[:, 0].min() - 1, stop = X |
Owner
There was a problem hiding this comment.
Seems like a syntax error to me. Ending brackets are missing, aren't they?
Comment on lines
-36
to
-50
| X1, X2 = np.meshgrid(np.arange(start = X_set[:, 0].min() - 1, stop = X_set[:, 0].max() + 1, step = 0.01), | ||
| np.arange(start = X_set[:, 1].min() - 1, stop = X_set[:, 1].max() + 1, step = 0.01)) | ||
| plt.contourf(X1, X2, classifier.predict(np.array([X1.ravel(), X2.ravel()]).T).reshape(X1.shape), | ||
| alpha = 0.75, cmap = ListedColormap(('red', 'green'))) | ||
| plt.xlim(X1.min(), X1.max()) | ||
| plt.ylim(X2.min(), X2.max()) | ||
| for i, j in enumerate(np.unique(y_set)): | ||
| plt.scatter(X_set[y_set == j, 0], X_set[y_set == j, 1], | ||
| c = ListedColormap(('red', 'green'))(i), label = j) | ||
| plt.title('Classifier (Training set)') | ||
| plt.xlabel('Age') | ||
| plt.ylabel('Estimated Salary') | ||
| plt.legend() | ||
| plt.show() | ||
|
|
Owner
There was a problem hiding this comment.
This code is here so that we can visualize the classifier results on training set. Why do you want to remove this code block?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.