forked from rapidsai/cuml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept fold index for TargetEncoder (rapidsai#4453)
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
- Loading branch information
1 parent
88d0e42
commit ac4db43
Showing
2 changed files
with
83 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters