GAA-UAM / scikit-fda

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

Issue/classifier_classes/logreg #496

Closed m5signorini closed 2 years ago

m5signorini commented 2 years ago

Solution for logistic regression of issue #480. I think it was only needed to change the last mlvr.fit in the fit method of logistic regression.

I also include here the corresponding updated test_classifier_classes, to test for all now correctly working classifiers.

codecov[bot] commented 2 years ago

Codecov Report

Base: 85.40% // Head: 85.41% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (a9e9e51) compared to base (aee15f4). Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #496 +/- ## =========================================== + Coverage 85.40% 85.41% +0.01% =========================================== Files 139 139 Lines 11100 11103 +3 =========================================== + Hits 9480 9484 +4 + Misses 1620 1619 -1 ``` | [Impacted Files](https://codecov.io/gh/GAA-UAM/scikit-fda/pull/496?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GAA-UAM) | Coverage Δ | | |---|---|---| | [skfda/ml/classification/\_logistic\_regression.py](https://codecov.io/gh/GAA-UAM/scikit-fda/pull/496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GAA-UAM#diff-c2tmZGEvbWwvY2xhc3NpZmljYXRpb24vX2xvZ2lzdGljX3JlZ3Jlc3Npb24ucHk=) | `86.41% <66.66%> (ø)` | | | [skfda/tests/test\_classifier\_classes.py](https://codecov.io/gh/GAA-UAM/scikit-fda/pull/496/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%> (ø)` | | | [skfda/misc/metrics/\_utils.py](https://codecov.io/gh/GAA-UAM/scikit-fda/pull/496/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=GAA-UAM#diff-c2tmZGEvbWlzYy9tZXRyaWNzL191dGlscy5weQ==) | `74.32% <0.00%> (+1.35%)` | :arrow_up: | 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.

m5signorini commented 2 years ago

I have not modified the class docstring but it appears to be failing the style test. Presumably it is because the use of :external:class to reference scikit learn classes. Should it be instead something like only :class:?

m5signorini commented 2 years ago

I have updated the corresponding files to avoid the style errors. Also, I include in this pull request the changes to the Target type var in _utils.