Update gaussian_naive_bayes.py#7406
Merged
cclauss merged 2 commits intoTheAlgorithms:masterfrom Oct 19, 2022
Merged
Conversation
Just adding in a final metric of accuracy to declare...
for more information, see https://pre-commit.ci
14 tasks
cclauss
reviewed
Oct 19, 2022
| # Gaussian Naive Bayes | ||
| nb_model = GaussianNB() | ||
| nb_model.fit(x_train, y_train) | ||
| time.sleep(2.9) |
Member
There was a problem hiding this comment.
Why are we waiting for 3 seconds?!? Comments needed to be added to explain such things.
cclauss
approved these changes
Oct 19, 2022
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.
Fixes #7407
Just adding in a final metric of accuracy to declare...
Describe your change:
I have imported another module from sklearn.metrics library i.e. accuracy_score to display the final accuracy of the trained model out on the console. Also, just to make it a little propped up, I also imported the time library and stopped the code-execution at two points in the middle (this won't affect the final accuracy of the model in any way).
Checklist:
Fixes: #{$ISSUE_NO}.