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

New PipeOpEncodePL for Piecewise Linear Encoding #861

Draft
wants to merge 20 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Collate:
'PipeOpEncode.R'
'PipeOpEncodeImpact.R'
'PipeOpEncodeLmer.R'
'PipeOpEncodePL.R'
'PipeOpFeatureUnion.R'
'PipeOpFilter.R'
'PipeOpFixFactors.R'
Expand Down
3 changes: 3 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ export(PipeOpDecode)
export(PipeOpEncode)
export(PipeOpEncodeImpact)
export(PipeOpEncodeLmer)
export(PipeOpEncodePL)
export(PipeOpEncodePLQuantiles)
export(PipeOpEncodePLTree)
export(PipeOpEnsemble)
export(PipeOpFeatureUnion)
export(PipeOpFilter)
Expand Down
2 changes: 1 addition & 1 deletion R/PipeOpEncode.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' @section Input and Output Channels:
#' Input and output channels are inherited from [`PipeOpTaskPreproc`].
#'
#' The output is the input [`Task`][mlr3::Task] with all affected `factor` and `ordered` parameters encoded according to the `method`
#' The output is the input [`Task`][mlr3::Task] with all affected `factor` and `ordered` columns encoded according to the `method`
#' parameter.
#'
#' @section State:
Expand Down
410 changes: 410 additions & 0 deletions R/PipeOpEncodePL.R

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions R/PipeOpQuantileBin.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#'
#' @section Parameters:
#' The parameters are the parameters inherited from [`PipeOpTaskPreproc`], as well as:
#' * `numsplits` :: `numeric(1)` \cr
#' * `numsplits` :: `integer(1)` \cr
#' Number of bins to create. Default is `2`.
#'
#' @section Internals:
Expand Down Expand Up @@ -58,7 +58,7 @@ PipeOpQuantileBin = R6Class("PipeOpQuantileBin",
initialize = function(id = "quantilebin", param_vals = list()) {
ps = ps(
numsplits = p_int(lower = 2, special_vals = list(NULL), tags = "train")
)
)
ps$values = list(numsplits = 2L)
super$initialize(id, param_set = ps, param_vals = param_vals, packages = "stats", feature_types = c("numeric", "integer"))
}
Expand Down
29 changes: 21 additions & 8 deletions R/bibentries.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ bibentries = c(

han_2005 = bibentry("InProceedings",
doi = "10.1007/11538059_91",
author = "Han, Hui and Wang, Wen-Yuan and Mao, Bing-Huan",
editor = "Huang, De-Shuang and Zhang, Xiao-Ping and Huang, Guang-Bin",
author = "Hui Han and Wen-Yuan Wang and Bing-Huan Mao",
editor = "De-Shuang Huang and Xiao-Ping Zhang and Guang-Bin Huang",
title = "Borderline-SMOTE: A New Over-Sampling Method in Imbalanced Data Sets Learning",
booktitle = "Advances in Intelligent Computing",
year = "2005",
Expand All @@ -107,11 +107,24 @@ bibentries = c(
),

freeman_1979 = bibentry("InCollection",
author = "Freeman III, A Myrick",
title = "The Hedonic Price Approach to Measuring Demand for Neighborhood Characteristics",
booktitle = "The Economics of Neighborhood",
year = "1979",
publisher = "Elsevier",
pages = "191--217"
doi = "10.1016/B978-0-12-636250-3.50015-5",
author = "A Myrick Freeman III",
title = "The Hedonic Price Approach to Measuring Demand for Neighborhood Characteristics",
booktitle = "The Economics of Neighborhood",
year = "1979",
publisher = "Elsevier",
pages = "191--217"
),


gorishniy_2022 = bibentry("InProceedings",
title = "On Embeddings for Numerical Features in Tabular Deep Learning",
volume = "35",
url = "https://proceedings.neurips.cc/paper_files/paper/2022/hash/9e9f0ffc3d836836ca96cbf8fe14b105-Abstract-Conference.html",
booktitle = "Advances in Neural Information Processing Systems",
author = "Yury Gorishniy and Ivan Rubachev and Artem Babenko",
year = "2022",
pages = "24991--25004"
)

)
3 changes: 3 additions & 0 deletions man/PipeOp.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/PipeOpEnsemble.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/PipeOpImpute.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/PipeOpTargetTrafo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/PipeOpTaskPreproc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/PipeOpTaskPreprocSimple.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_adas.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions man/mlr_pipeops_blsmote.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_boxcox.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_branch.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_chunk.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_classbalancing.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_classifavg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_classweights.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_colapply.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_collapsefactors.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_colroles.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_copy.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_datefeatures.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_decode.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion man/mlr_pipeops_encode.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_encodeimpact.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions man/mlr_pipeops_encodelmer.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading