-
Notifications
You must be signed in to change notification settings - Fork 552
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
Comments
Thank you for raising the issue. this would be pretty straightforward. |
This issue has been labeled |
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
done. Thank you for raising the issue. |
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
accepts index.
e.g. xfeat accepts fold from sklearn https://github.com/pfnet-research/xfeat/blob/master/xfeat/cat_encoder/_target_encoder.py#L91
The text was updated successfully, but these errors were encountered: