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

[FEA] accept index for TargetEncoder #4441

Closed
KazukiOnodera opened this issue Dec 10, 2021 · 3 comments
Closed

[FEA] accept index for TargetEncoder #4441

KazukiOnodera opened this issue Dec 10, 2021 · 3 comments
Assignees
Labels
? - Needs Triage Need team to review and classify feature request New feature or request inactive-30d

Comments

@KazukiOnodera
Copy link

accepts index.
e.g. xfeat accepts fold from sklearn https://github.com/pfnet-research/xfeat/blob/master/xfeat/cat_encoder/_target_encoder.py#L91

@KazukiOnodera KazukiOnodera added ? - Needs Triage Need team to review and classify feature request New feature or request labels Dec 10, 2021
@daxiongshu daxiongshu self-assigned this Dec 11, 2021
@daxiongshu
Copy link
Contributor

Thank you for raising the issue. this would be pretty straightforward.

@github-actions
Copy link

This issue has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this issue if no further response or action is needed. Otherwise, please respond with a comment indicating any updates or changes to the original issue and/or confirm this issue still needs to be addressed. This issue will be labeled inactive-90d if there is no activity in the next 60 days.

rapids-bot bot pushed a commit that referenced this issue Jan 20, 2022
As requested in issue #4441, in this PR we let TargetEncoder accept a customized fold index array in `fit()`
For example, in the following code
```
X = [1, 2, 3, 1, 2]
y = [1, 0, 0, 0, 1]
fold_id = [0,1,0,0,1]
encoder = TargetEncoder(split_method='customize')
encoder.fit(X,y,fold_id=fold_id)
``` 
The target encoder will fit subarray of `X` and `y` where `fold_id==0` to encode the subarray of `X` where `fold_id==1`, and vice versa.

Authors:
  - Jiwei Liu (https://github.com/daxiongshu)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: #4453
@daxiongshu
Copy link
Contributor

done. Thank you for raising the issue.

vimarsh6739 pushed a commit to vimarsh6739/cuml that referenced this issue Oct 9, 2023
As requested in issue rapidsai#4441, in this PR we let TargetEncoder accept a customized fold index array in `fit()`
For example, in the following code
```
X = [1, 2, 3, 1, 2]
y = [1, 0, 0, 0, 1]
fold_id = [0,1,0,0,1]
encoder = TargetEncoder(split_method='customize')
encoder.fit(X,y,fold_id=fold_id)
``` 
The target encoder will fit subarray of `X` and `y` where `fold_id==0` to encode the subarray of `X` where `fold_id==1`, and vice versa.

Authors:
  - Jiwei Liu (https://github.com/daxiongshu)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4453
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify feature request New feature or request inactive-30d
Projects
None yet
Development

No branches or pull requests

2 participants