[MRG+1] correct comparison in GaussianNB for 'priors'#10005
[MRG+1] correct comparison in GaussianNB for 'priors'#10005TomDLT merged 2 commits intoscikit-learn:masterfrom
Conversation
jnothman
left a comment
There was a problem hiding this comment.
I've not yet double-checked that this test fails on master (does it?), but this otherwise lgtm
| priors = np.array([0.08, 0.14, 0.03, 0.16, 0.11, 0.16, 0.07, 0.14, 0.11, 0.0]) | ||
| Y = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) | ||
| clf = GaussianNB(priors) | ||
| clf.fit(X, Y) |
sklearn/tests/test_naive_bayes.py
Outdated
|
|
||
|
|
||
| def test_gnb_priors_sum_isclose(): | ||
| """Test whether the class prior sum is properly tested""" |
There was a problem hiding this comment.
Use a comment rather than a docstring here. We do this because nose hides the function name when docstring is used.
|
I have addressed the comments and fixed the failing flake8 errors. Do I need to squash the commits? (I have 2 commits now) Was wondering if you follow some strict policy against 'squashing' public commits. |
|
what is the benefit of squashing commits at this stage? we squash when we
merge, and until then it's good to have a record of what's changed since
the last review, and to be able to follow links to commits.
…On 26 Oct 2017 4:22 pm, "Gaurav Dhingra" ***@***.***> wrote:
I have addressed the comments and fixed the failing flake8 errors. Do I
need to squash the commits? (I have 2 commits now) Was wondering if you
follow some strict policy against 'squashing' public commits.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#10005 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEz6zvxy9ZPyCvLYVqvOOo7MIOC0XqUks5swBcXgaJpZM4QGh4g>
.
|
|
That is good to know, since I too was wondering as to why I don't see no
'merge commits' in git history, your comment explains it.
|
Test does fail on master. Squashed and merged, thanks @gxyd ! |
|
Thanks @TomDLT . This was my first contribution to scikit-learn. |
|
Congrats on your first contribution, hoping to see you around again ! |
|
I'll be here. |
|
Forgot a changelog entry. @gxyd do you mind submitting a new PR with a change to doc/whats_new? |
…cs/donigian-update-contribution-guidelines * 'master' of github.com:scikit-learn/scikit-learn: (23 commits) fixes scikit-learn#10031: fix attribute name and shape in documentation (scikit-learn#10033) [MRG+1] add changelog entry for fixed and merged PR scikit-learn#10005 issue scikit-learn#9633 (scikit-learn#10025) [MRG] Fix LogisticRegression see also should include LogisticRegressionCV(scikit-learn#9995) (scikit-learn#10022) [MRG + 1] Labels of clustering should start at 0 or -1 if noise (scikit-learn#10015) MAINT Remove redundancy in scikit-learn#9552 (scikit-learn#9573) [MRG+1] correct comparison in GaussianNB for 'priors' (scikit-learn#10005) [MRG + 1] ENH add check_inverse in FunctionTransformer (scikit-learn#9399) [MRG] FIX bug in nested set_params usage (scikit-learn#9999) [MRG+1] Fix LOF and Isolation benchmarks (scikit-learn#9798) [MRG + 1] Fix negative inputs checking in mean_squared_log_error (scikit-learn#9968) DOC Fix typo (scikit-learn#9996) DOC Fix typo: x axis -> y axis (scikit-learn#9985) improve example plot_forest_iris.py (scikit-learn#9989) [MRG+1] Deprecate pooling_func unused parameter in AgglomerativeClustering (scikit-learn#9875) DOC update news DOC Fix three typos in manifold documentation (scikit-learn#9990) DOC add missing dot in docstring DOC Add what's new for 0.19.1 (scikit-learn#9983) Improve readability of outlier detection example. (scikit-learn#9973) DOC: Fixed typo (scikit-learn#9977) ...
…issue scikit-learn#9633 (scikit-learn#10025) * add changelog entry for fixed and merged PR scikit-learn#10005 issue scikit-learn#9633 * change name * change PR number
…issue scikit-learn#9633 (scikit-learn#10025) * add changelog entry for fixed and merged PR scikit-learn#10005 issue scikit-learn#9633 * change name * change PR number
Reference Issues/PRs
Fixes #9633
What does this implement/fix? Explain your changes.
correct comparison in GaussianNB for 'priors'
Any other comments?
I am not fully sure if I have written the test as correctly since, I have written it as
clf.fit(X, Y)and I don't know if I should useassert_....or not. That is why I have not putMRGon title of PR.