Skip to content

feat: remove OrdinalEncoder#107

Merged
lars-reimann merged 3 commits intomainfrom
remove_ordinal_encoder
Mar 28, 2023
Merged

feat: remove OrdinalEncoder#107
lars-reimann merged 3 commits intomainfrom
remove_ordinal_encoder

Conversation

@lars-reimann
Copy link
Copy Markdown
Member

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

Summary of Changes

The OrdinalEncoder was a bit of an outlier compared to the other Transformer classes:

  • It could only be applied to a single column instead of a list of columns. Because of this, it was not possible to implement Common superclass for transformers #61.
  • Nothing was "learned" since the user had to specify the value order explicitly. The fit step was completely unnecessary.

Therefore, I've removed the class OrdinalEncoder. Instead the transform_column method on a Table can be used. If eventually find this to be too cumbersome, we can implement a new method transform_column_into_ordered_labels on Table.

@lars-reimann lars-reimann requested a review from a team as a code owner March 28, 2023 08:37
@lars-reimann
Copy link
Copy Markdown
Member Author

lars-reimann commented Mar 28, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 2 0 0 0.84s
✅ PYTHON flake8 2 0 0.53s
✅ PYTHON isort 2 0 0 0.29s
✅ PYTHON mypy 2 0 2.12s
✅ PYTHON pylint 2 0 3.57s
✅ REPOSITORY git_diff yes no 0.02s

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 28, 2023

Codecov Report

Attention: Patch coverage is 84.61538% with 2 lines in your changes missing coverage. Please review.

Project coverage is 92.30%. Comparing base (c238d21) to head (d7e5e4a).
Report is 500 commits behind head on main.

Files Patch % Lines
src/safeds/data/tabular/containers/_table.py 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #107      +/-   ##
==========================================
+ Coverage   92.06%   92.30%   +0.23%     
==========================================
  Files          36       35       -1     
  Lines        1223     1182      -41     
==========================================
- Hits         1126     1091      -35     
+ Misses         97       91       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lars-reimann lars-reimann merged commit b92bba5 into main Mar 28, 2023
@lars-reimann lars-reimann deleted the remove_ordinal_encoder branch March 28, 2023 08:45
lars-reimann pushed a commit that referenced this pull request Mar 29, 2023
## [0.7.0](v0.6.0...v0.7.0) (2023-03-29)

### Features

* `sort_rows` of a `Table` ([#104](#104)) ([20aaf5e](20aaf5e)), closes [#14](#14)
* add `_file` suffix to methods interacting with files ([#103](#103)) ([ec011e4](ec011e4))
* improve transformers for tabular data ([#108](#108)) ([b18a06d](b18a06d)), closes [#61](#61) [#90](#90)
* remove `OrdinalEncoder` ([#107](#107)) ([b92bba5](b92bba5)), closes [#61](#61)
* specify features and target when creating a `TaggedTable` ([#114](#114)) ([95e1fc7](95e1fc7)), closes [#27](#27)
* swap `name` and `data` parameters of `Column` ([#105](#105)) ([c2f8da5](c2f8da5))
@lars-reimann
Copy link
Copy Markdown
Member Author

🎉 This PR is included in version 0.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Mar 29, 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.

1 participant