Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename fit_transform to fit_and_transform #112

Closed
lars-reimann opened this issue Mar 29, 2023 · 5 comments · Fixed by #119
Closed

Rename fit_transform to fit_and_transform #112

lars-reimann opened this issue Mar 29, 2023 · 5 comments · Fixed by #119
Assignees
Labels
enhancement 💡 New feature or request good first issue Good for newcomers released Included in a release

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Mar 29, 2023

Is your feature request related to a problem?

The fit_transform method of the TableTransformer class does not clearly indicate that the method 1. fits the transformer 2. transforms the data.

Desired solution

Call it fit_and_transform instead.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

@lars-reimann lars-reimann added the enhancement 💡 New feature or request label Mar 29, 2023
@github-project-automation github-project-automation bot moved this to Backlog in Library Mar 29, 2023
@lars-reimann lars-reimann added the good first issue Good for newcomers label Mar 29, 2023
@gantanikhilraj
Copy link
Contributor

gantanikhilraj commented Mar 29, 2023

I would like to work on this issue, please assign it to me.
As of my understanding, I need the replace fit_transform to fit_and_transform in every file where it is called or defined? is that what you mentioned.

@dev-DTECH
Copy link
Contributor

I would like to work on this issue.

I understood that the method

fit_transform(self, table: Table, column_names: Optional[list[str]] = None) -> Table

needs to be refactored as

fit_and_transform(self, table: Table, column_names: Optional[list[str]] = None) -> Table

in _table_transformer.py

@lars-reimann
Copy link
Member Author

lars-reimann commented Mar 29, 2023

This is the method in question: fit_transform. Naturally all usages, e.g. in tests, need to renamed as well, but the automated refactorings of an IDE (or even search & replace in this case) should make quick work of that.

If you want to work on that, I'll gladly accept a pull request.

@dev-DTECH
Copy link
Contributor

Ok @lars-reimann can you assign the issue to me. I will do the necessary changes and make a PR.

lars-reimann added a commit that referenced this issue Mar 30, 2023
Closes #112.

### Summary of Changes

Rename `fit_transform` to `fit_and_transform` to better indicate that
this method combines the two steps `fit` and `transform`.

---------

Co-authored-by: nikhilraj2003 <Nikhilraj@720>
Co-authored-by: Lars Reimann <[email protected]>
Co-authored-by: dev-DTECH <[email protected]>
@github-project-automation github-project-automation bot moved this from Backlog to ✔️ Done in Library Mar 30, 2023
lars-reimann pushed a commit that referenced this issue Mar 31, 2023
## [0.8.0](v0.7.0...v0.8.0) (2023-03-31)

### Features

* create empty `Table` without schema ([#128](#128)) ([ddd3f59](ddd3f59)), closes [#127](#127)
* improve `ColumnType`s ([#132](#132)) ([1786a87](1786a87)), closes [#113](#113)
* infer schema of row if not passed explicitly ([#134](#134)) ([c5869bb](c5869bb)), closes [#15](#15)
* new method `is_fitted` to check whether a model is fitted ([#130](#130)) ([8e1c3ea](8e1c3ea))
* new method `is_fitted` to check whether a transformer is fitted ([#131](#131)) ([e20954f](e20954f))
* rename `drop_XY` methods of `Table` to `remove_XY` ([#122](#122)) ([98d76a4](98d76a4))
* rename `fit_transform` to `fit_and_transform` ([#119](#119)) ([76a7112](76a7112)), closes [#112](#112)
* rename `shuffle` to `shuffle_rows` ([#125](#125)) ([ea21928](ea21928))
* rename `slice` to `slice_rows` ([#126](#126)) ([20d21c2](20d21c2))
* rename `TableSchema` to `Schema` ([#133](#133)) ([1419d25](1419d25))
@lars-reimann
Copy link
Member Author

🎉 This issue has been resolved in version 0.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request good first issue Good for newcomers released Included in a release
Projects
Archived in project
3 participants