GAA-UAM / scikit-fda

Functional Data Analysis Python package
https://fda.readthedocs.io
BSD 3-Clause "New" or "Revised" License
301 stars 54 forks source link

Issue/classifier_classes/kneighbours #491

Closed m5signorini closed 1 year ago

m5signorini commented 1 year ago

Solution of issue #480 for KNeighborsClassifier and RadiusNeighborsClassifier.

The fit method from their parent classifier class has been updated to include the initialization of the classes_attribute. To be able to use the corresponding functionality from _utils, the Target generic has been modified to a TargetClassification type var bounded to NDArrayInt and NDArrayStr, to be able to work with both string and integer class types.

codecov[bot] commented 1 year ago

Codecov Report

Base: 85.33% // Head: 85.34% // Increases project coverage by +0.00% :tada:

Coverage data is based on head (a29efec) compared to base (566e3e3). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #491 +/- ## ======================================== Coverage 85.33% 85.34% ======================================== Files 138 138 Lines 11062 11069 +7 ======================================== + Hits 9440 9447 +7 Misses 1622 1622 ``` | [Impacted Files](https://codecov.io/gh/GAA-UAM/scikit-fda/pull/491?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GAA-UAM) | Coverage Δ | | |---|---|---| | [skfda/ml/\_neighbors\_base.py](https://codecov.io/gh/GAA-UAM/scikit-fda/pull/491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GAA-UAM#diff-c2tmZGEvbWwvX25laWdoYm9yc19iYXNlLnB5) | `91.61% <100.00%> (+0.27%)` | :arrow_up: | | [skfda/tests/test\_classifier\_classes.py](https://codecov.io/gh/GAA-UAM/scikit-fda/pull/491/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GAA-UAM#diff-c2tmZGEvdGVzdHMvdGVzdF9jbGFzc2lmaWVyX2NsYXNzZXMucHk=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GAA-UAM). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GAA-UAM)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.