DOC Ensures that function passes numpydoc validation: f1_score#22358
DOC Ensures that function passes numpydoc validation: f1_score#22358glemaitre merged 3 commits intoscikit-learn:mainfrom
Conversation
thomasjpfan
left a comment
There was a problem hiding this comment.
Thanks for the PR @NumberPiOso ! There does not appear to be any changes to f1_score's docstring in this PR. You can see the numpydoc failures on the CI here
Yes, I do get to see the errors in the CI E Notes
E -----
E When ``true positive + false positive == 0``, precision is undefined.
E When ``true positive + false negative == 0``, recall is undefined.
E In such cases, by default the metric will be set to 0, as will f-score,
E and ``UndefinedMetricWarning`` will be raised. This behavior can be
E modified with ``zero_division``.
E
E # Errors
E
E - GL07: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Notes, References, Examples
E - SA04: Missing description for See Also "fbeta_score" reference
E - SA04: Missing description for See Also "precision_recall_fscore_support" reference
E - SA04: Missing description for See Also "jaccard_score" reference
E - SA04: Missing description for See Also "multilabel_confusion_matrix" referenceHowever when I run ================================================== test session starts ===================================================
platform linux -- Python 3.9.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /home/pi/anaconda3/envs/sklearn-env/bin/python3.9
cachedir: .pytest_cache
rootdir: /home/pi/git/scikit-learn, configfile: setup.cfg
plugins: cov-3.0.0
collected 0 items / 2 skipped @thomasjpfan Do you know why the error is not shown ? |
|
You should have some tests running tests with When I pull in your branch in locally, I can see the same error message as the CI when running: pytest -v sklearn/tests/test_docstrings.py -k sklearn.metrics._classification.f1_score |
|
@thomasjpfan can I work on this issue as it seems no activities for a few days. |
|
Let me keep working at this, I just have not been able to create the environment properly |
|
okay sure :) |
|
I pushed the necessary change and I will merge this PR when the CIs turn green. |
…t-learn#22358) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com>
Reference Issues/PRs
Addresses #21350.
What does this implement/fix? Explain your changes.
Updates docstring in function to fix numpydoc errors.