Skip to content

fix: "UserWarning: X has feature names" when predicting#53

Merged
lars-reimann merged 3 commits into
mainfrom
51-suppress-scikit-learn-warning-x-has-feature-names
Mar 20, 2023
Merged

fix: "UserWarning: X has feature names" when predicting#53
lars-reimann merged 3 commits into
mainfrom
51-suppress-scikit-learn-warning-x-has-feature-names

Conversation

@lars-reimann
Copy link
Copy Markdown
Member

@lars-reimann lars-reimann commented Mar 20, 2023

Closes #51.

Summary of Changes

Suppress a warning from scikit-learn that is not relevant for us.

See also: https://stackoverflow.com/questions/69326639/sklearn-warning-valid-feature-names-in-version-1-0

@lars-reimann lars-reimann linked an issue Mar 20, 2023 that may be closed by this pull request
@lars-reimann
Copy link
Copy Markdown
Member Author

lars-reimann commented Mar 20, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 17 0 0 0.67s
✅ PYTHON flake8 17 0 0.4s
✅ PYTHON isort 17 0 0 0.23s
✅ PYTHON mypy 17 0 1.71s
✅ PYTHON pylint 17 0 1.96s
✅ REPOSITORY git_diff yes no 0.03s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 20, 2023

Codecov Report

Merging #53 (6e45c13) into main (68ddf24) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #53   +/-   ##
=======================================
  Coverage   91.51%   91.51%           
=======================================
  Files          45       45           
  Lines        1132     1132           
=======================================
  Hits         1036     1036           
  Misses         96       96           
Impacted Files Coverage Δ
src/safeds/ml/_util_sklearn.py 82.75% <100.00%> (ø)
src/safeds/ml/classification/_ada_boost.py 100.00% <100.00%> (ø)
src/safeds/ml/classification/_decision_tree.py 100.00% <100.00%> (ø)
...lassification/_gradient_boosting_classification.py 100.00% <100.00%> (ø)
...c/safeds/ml/classification/_k_nearest_neighbors.py 100.00% <100.00%> (ø)
...c/safeds/ml/classification/_logistic_regression.py 100.00% <100.00%> (ø)
src/safeds/ml/classification/_random_forest.py 100.00% <100.00%> (ø)
src/safeds/ml/regression/_ada_boost.py 100.00% <100.00%> (ø)
src/safeds/ml/regression/_decision_tree.py 100.00% <100.00%> (ø)
...rc/safeds/ml/regression/_elastic_net_regression.py 100.00% <100.00%> (ø)
... and 6 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lars-reimann lars-reimann merged commit 74b0753 into main Mar 20, 2023
@lars-reimann lars-reimann deleted the 51-suppress-scikit-learn-warning-x-has-feature-names branch March 20, 2023 21:19
lars-reimann pushed a commit that referenced this pull request Mar 24, 2023
## [0.3.0](v0.2.0...v0.3.0) (2023-03-24)

### Features

* make `Column` and `Row` iterable ([#55](#55)) ([74eea1f](74eea1f)), closes [#47](#47)

### Bug Fixes

* "UserWarning: X has feature names" when predicting ([#53](#53)) ([74b0753](74b0753)), closes [#51](#51)
@lars-reimann
Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 0.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Included in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suppress scikit-learn warning "X has feature names"

1 participant