From 8b94aef17a7d98d8c08da200fe3a12d965c43718 Mon Sep 17 00:00:00 2001 From: mb706 Date: Wed, 18 Dec 2024 10:26:02 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20mlr-org/?= =?UTF-8?q?mlr3pipelines@c4e71a291f2732b43e3511afeaafdd30ffff9713=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- news/index.html | 2 + pkgdown.yml | 2 +- reference/PipeOp.html | 1 + reference/PipeOpDecode.html | 8 + reference/PipeOpEnsemble.html | 1 + reference/PipeOpImpute.html | 1 + reference/PipeOpTargetTrafo.html | 1 + reference/PipeOpTaskPreproc.html | 1 + reference/PipeOpTaskPreprocSimple.html | 1 + reference/index.html | 6 + reference/mlr_pipeops.html | 120 ++++--- reference/mlr_pipeops_adas.html | 1 + reference/mlr_pipeops_blsmote.html | 1 + reference/mlr_pipeops_boxcox.html | 1 + reference/mlr_pipeops_branch.html | 1 + reference/mlr_pipeops_chunk.html | 1 + reference/mlr_pipeops_classbalancing.html | 1 + reference/mlr_pipeops_classifavg.html | 1 + reference/mlr_pipeops_classweights.html | 1 + reference/mlr_pipeops_colapply.html | 1 + reference/mlr_pipeops_collapsefactors.html | 1 + reference/mlr_pipeops_colroles.html | 1 + reference/mlr_pipeops_copy.html | 1 + reference/mlr_pipeops_datefeatures.html | 1 + reference/mlr_pipeops_decode.html | 338 ++++++++++++++++++ reference/mlr_pipeops_encode.html | 1 + reference/mlr_pipeops_encodeimpact.html | 1 + reference/mlr_pipeops_encodelmer.html | 1 + reference/mlr_pipeops_featureunion.html | 1 + reference/mlr_pipeops_filter.html | 47 +-- reference/mlr_pipeops_fixfactors.html | 1 + reference/mlr_pipeops_histbin.html | 1 + reference/mlr_pipeops_ica.html | 43 +-- reference/mlr_pipeops_imputeconstant.html | 1 + reference/mlr_pipeops_imputehist.html | 1 + reference/mlr_pipeops_imputelearner.html | 3 +- reference/mlr_pipeops_imputemean.html | 1 + reference/mlr_pipeops_imputemedian.html | 1 + reference/mlr_pipeops_imputemode.html | 1 + reference/mlr_pipeops_imputeoor.html | 1 + reference/mlr_pipeops_imputesample.html | 1 + reference/mlr_pipeops_kernelpca.html | 1 + reference/mlr_pipeops_learner.html | 1 + reference/mlr_pipeops_learner_pi_cvplus.html | 1 + reference/mlr_pipeops_learner_quantiles.html | 1 + reference/mlr_pipeops_missind.html | 1 + reference/mlr_pipeops_modelmatrix.html | 1 + reference/mlr_pipeops_multiplicityexply.html | 1 + reference/mlr_pipeops_multiplicityimply.html | 1 + reference/mlr_pipeops_mutate.html | 1 + reference/mlr_pipeops_nearmiss.html | 1 + reference/mlr_pipeops_nmf.html | 1 + reference/mlr_pipeops_nop.html | 1 + reference/mlr_pipeops_ovrsplit.html | 1 + reference/mlr_pipeops_ovrunite.html | 1 + reference/mlr_pipeops_pca.html | 1 + reference/mlr_pipeops_proxy.html | 1 + reference/mlr_pipeops_quantilebin.html | 1 + reference/mlr_pipeops_randomprojection.html | 1 + reference/mlr_pipeops_randomresponse.html | 1 + reference/mlr_pipeops_regravg.html | 1 + reference/mlr_pipeops_removeconstants.html | 1 + reference/mlr_pipeops_renamecolumns.html | 1 + reference/mlr_pipeops_replicate.html | 1 + reference/mlr_pipeops_rowapply.html | 1 + reference/mlr_pipeops_scale.html | 1 + reference/mlr_pipeops_scalemaxabs.html | 1 + reference/mlr_pipeops_scalerange.html | 1 + reference/mlr_pipeops_select.html | 1 + reference/mlr_pipeops_smote.html | 1 + reference/mlr_pipeops_smotenc.html | 1 + reference/mlr_pipeops_spatialsign.html | 1 + reference/mlr_pipeops_subsample.html | 1 + reference/mlr_pipeops_targetinvert.html | 1 + reference/mlr_pipeops_targetmutate.html | 5 +- .../mlr_pipeops_targettrafoscalerange.html | 5 +- reference/mlr_pipeops_textvectorizer.html | 1 + reference/mlr_pipeops_threshold.html | 1 + reference/mlr_pipeops_tomek.html | 1 + reference/mlr_pipeops_tunethreshold.html | 1 + reference/mlr_pipeops_unbranch.html | 1 + reference/mlr_pipeops_updatetarget.html | 1 + reference/mlr_pipeops_vtreat.html | 1 + reference/mlr_pipeops_yeojohnson.html | 1 + search.json | 2 +- sitemap.xml | 1 + 86 files changed, 545 insertions(+), 110 deletions(-) create mode 100644 reference/PipeOpDecode.html create mode 100644 reference/mlr_pipeops_decode.html diff --git a/news/index.html b/news/index.html index cb3485071..7282a3b52 100644 --- a/news/index.html +++ b/news/index.html @@ -51,6 +51,8 @@

m
  • Fix: PipeOpCollapseFactors now correctly collapses levels of ordered factors.
  • Fix: LearnerClassifAvg and LearnerRegrAvg hyperparameters get the "required" tag.
  • New parameter use_groups (default TRUE) for PipeOpSubsampling to respect grouping (changed default behaviour for grouped data)
  • +
  • Dictionary sugar functions po() / pos() / ppl() / ppls() now make suggestions for entries in both mlr_pipeops as well as mlr_graphs when an object by the given name could not be found in the respective dictionary.
  • +
  • New PipeOp PipeOpDecode / po("decode") to reverse one-hot or treatment encoding.
  • mlr3pipelines 0.7.1

    CRAN release: 2024-11-14

    diff --git a/pkgdown.yml b/pkgdown.yml index 7a68a5f6f..3a0b65ac7 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.1.1 pkgdown_sha: ~ articles: extending: extending.html -last_built: 2024-12-10T10:59Z +last_built: 2024-12-18T10:24Z urls: reference: https://mlr3pipelines.mlr-org.com/reference article: https://mlr3pipelines.mlr-org.com/articles diff --git a/reference/PipeOp.html b/reference/PipeOp.html index 118f457fc..059fa2de5 100644 --- a/reference/PipeOp.html +++ b/reference/PipeOp.html @@ -318,6 +318,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/PipeOpDecode.html b/reference/PipeOpDecode.html new file mode 100644 index 000000000..205c19741 --- /dev/null +++ b/reference/PipeOpDecode.html @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/reference/PipeOpEnsemble.html b/reference/PipeOpEnsemble.html index 6ce42314f..5ea4cad86 100644 --- a/reference/PipeOpEnsemble.html +++ b/reference/PipeOpEnsemble.html @@ -160,6 +160,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/PipeOpImpute.html b/reference/PipeOpImpute.html index 1bb34d05f..a9aab05b2 100644 --- a/reference/PipeOpImpute.html +++ b/reference/PipeOpImpute.html @@ -190,6 +190,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/PipeOpTargetTrafo.html b/reference/PipeOpTargetTrafo.html index 9355ac4ae..35f93e0cb 100644 --- a/reference/PipeOpTargetTrafo.html +++ b/reference/PipeOpTargetTrafo.html @@ -213,6 +213,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/PipeOpTaskPreproc.html b/reference/PipeOpTaskPreproc.html index 55c077ff2..71da01f58 100644 --- a/reference/PipeOpTaskPreproc.html +++ b/reference/PipeOpTaskPreproc.html @@ -292,6 +292,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/PipeOpTaskPreprocSimple.html b/reference/PipeOpTaskPreprocSimple.html index 3a9186af6..bb70f5433 100644 --- a/reference/PipeOpTaskPreprocSimple.html +++ b/reference/PipeOpTaskPreprocSimple.html @@ -214,6 +214,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/index.html b/reference/index.html index 56c97cddb..e25c303d2 100644 --- a/reference/index.html +++ b/reference/index.html @@ -240,6 +240,12 @@

    PipeOpsPreprocess Date Features
    + mlr_pipeops_decode PipeOpDecode + +
    +
    Reverse Factor Encoding
    +
    + mlr_pipeops_encode PipeOpEncode
    diff --git a/reference/mlr_pipeops.html b/reference/mlr_pipeops.html index a75d14791..35d81501b 100644 --- a/reference/mlr_pipeops.html +++ b/reference/mlr_pipeops.html @@ -116,6 +116,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, @@ -218,65 +219,66 @@

    Examples#> 11: colroles 1 1 mlr3pipelines #> 12: copy 1 NA mlr3pipelines #> 13: datefeatures 1 1 mlr3pipelines -#> 14: encode 1 1 mlr3pipelines,stats -#> 15: encodeimpact 1 1 mlr3pipelines -#> 16: encodelmer 1 1 mlr3pipelines,lme4,nloptr -#> 17: featureunion NA 1 mlr3pipelines -#> 18: filter 1 1 mlr3pipelines -#> 19: fixfactors 1 1 mlr3pipelines -#> 20: histbin 1 1 mlr3pipelines,graphics -#> 21: ica 1 1 mlr3pipelines,fastICA -#> 22: imputeconstant 1 1 mlr3pipelines -#> 23: imputehist 1 1 mlr3pipelines,graphics -#> 24: imputelearner 1 1 mlr3pipelines -#> 25: imputemean 1 1 mlr3pipelines -#> 26: imputemedian 1 1 mlr3pipelines,stats -#> 27: imputemode 1 1 mlr3pipelines -#> 28: imputeoor 1 1 mlr3pipelines -#> 29: imputesample 1 1 mlr3pipelines -#> 30: kernelpca 1 1 mlr3pipelines,kernlab -#> 31: learner 1 1 mlr3pipelines -#> 32: learner_cv 1 1 mlr3pipelines -#> 33: learner_pi_cvplus 1 1 mlr3pipelines -#> 34: learner_quantiles 1 1 mlr3pipelines -#> 35: missind 1 1 mlr3pipelines -#> 36: modelmatrix 1 1 mlr3pipelines,stats -#> 37: multiplicityexply 1 NA mlr3pipelines -#> 38: multiplicityimply NA 1 mlr3pipelines -#> 39: mutate 1 1 mlr3pipelines -#> 40: nearmiss 1 1 mlr3pipelines,themis -#> 41: nmf 1 1 mlr3pipelines,MASS,NMF -#> 42: nop 1 1 mlr3pipelines -#> 43: ovrsplit 1 1 mlr3pipelines -#> 44: ovrunite 1 1 mlr3pipelines -#> 45: pca 1 1 mlr3pipelines -#> 46: proxy NA 1 mlr3pipelines -#> 47: quantilebin 1 1 mlr3pipelines,stats -#> 48: randomprojection 1 1 mlr3pipelines -#> 49: randomresponse 1 1 mlr3pipelines -#> 50: regravg NA 1 mlr3pipelines -#> 51: removeconstants 1 1 mlr3pipelines -#> 52: renamecolumns 1 1 mlr3pipelines -#> 53: replicate 1 1 mlr3pipelines -#> 54: rowapply 1 1 mlr3pipelines -#> 55: scale 1 1 mlr3pipelines -#> 56: scalemaxabs 1 1 mlr3pipelines -#> 57: scalerange 1 1 mlr3pipelines -#> 58: select 1 1 mlr3pipelines -#> 59: smote 1 1 mlr3pipelines,smotefamily -#> 60: smotenc 1 1 mlr3pipelines,themis -#> 61: spatialsign 1 1 mlr3pipelines -#> 62: subsample 1 1 mlr3pipelines -#> 63: targetinvert 2 1 mlr3pipelines -#> 64: targetmutate 1 2 mlr3pipelines -#> 65: targettrafoscalerange 1 2 mlr3pipelines -#> 66: textvectorizer 1 1 mlr3pipelines,quanteda,stopwords -#> 67: threshold 1 1 mlr3pipelines -#> 68: tomek 1 1 mlr3pipelines,themis -#> 69: tunethreshold 1 1 mlr3pipelines,bbotk -#> 70: unbranch NA 1 mlr3pipelines -#> 71: vtreat 1 1 mlr3pipelines,vtreat -#> 72: yeojohnson 1 1 mlr3pipelines,bestNormalize +#> 14: decode 1 1 mlr3pipelines +#> 15: encode 1 1 mlr3pipelines,stats +#> 16: encodeimpact 1 1 mlr3pipelines +#> 17: encodelmer 1 1 mlr3pipelines,lme4,nloptr +#> 18: featureunion NA 1 mlr3pipelines +#> 19: filter 1 1 mlr3pipelines +#> 20: fixfactors 1 1 mlr3pipelines +#> 21: histbin 1 1 mlr3pipelines,graphics +#> 22: ica 1 1 mlr3pipelines,fastICA +#> 23: imputeconstant 1 1 mlr3pipelines +#> 24: imputehist 1 1 mlr3pipelines,graphics +#> 25: imputelearner 1 1 mlr3pipelines +#> 26: imputemean 1 1 mlr3pipelines +#> 27: imputemedian 1 1 mlr3pipelines,stats +#> 28: imputemode 1 1 mlr3pipelines +#> 29: imputeoor 1 1 mlr3pipelines +#> 30: imputesample 1 1 mlr3pipelines +#> 31: kernelpca 1 1 mlr3pipelines,kernlab +#> 32: learner 1 1 mlr3pipelines +#> 33: learner_cv 1 1 mlr3pipelines +#> 34: learner_pi_cvplus 1 1 mlr3pipelines +#> 35: learner_quantiles 1 1 mlr3pipelines +#> 36: missind 1 1 mlr3pipelines +#> 37: modelmatrix 1 1 mlr3pipelines,stats +#> 38: multiplicityexply 1 NA mlr3pipelines +#> 39: multiplicityimply NA 1 mlr3pipelines +#> 40: mutate 1 1 mlr3pipelines +#> 41: nearmiss 1 1 mlr3pipelines,themis +#> 42: nmf 1 1 mlr3pipelines,MASS,NMF +#> 43: nop 1 1 mlr3pipelines +#> 44: ovrsplit 1 1 mlr3pipelines +#> 45: ovrunite 1 1 mlr3pipelines +#> 46: pca 1 1 mlr3pipelines +#> 47: proxy NA 1 mlr3pipelines +#> 48: quantilebin 1 1 mlr3pipelines,stats +#> 49: randomprojection 1 1 mlr3pipelines +#> 50: randomresponse 1 1 mlr3pipelines +#> 51: regravg NA 1 mlr3pipelines +#> 52: removeconstants 1 1 mlr3pipelines +#> 53: renamecolumns 1 1 mlr3pipelines +#> 54: replicate 1 1 mlr3pipelines +#> 55: rowapply 1 1 mlr3pipelines +#> 56: scale 1 1 mlr3pipelines +#> 57: scalemaxabs 1 1 mlr3pipelines +#> 58: scalerange 1 1 mlr3pipelines +#> 59: select 1 1 mlr3pipelines +#> 60: smote 1 1 mlr3pipelines,smotefamily +#> 61: smotenc 1 1 mlr3pipelines,themis +#> 62: spatialsign 1 1 mlr3pipelines +#> 63: subsample 1 1 mlr3pipelines +#> 64: targetinvert 2 1 mlr3pipelines +#> 65: targetmutate 1 2 mlr3pipelines +#> 66: targettrafoscalerange 1 2 mlr3pipelines +#> 67: textvectorizer 1 1 mlr3pipelines,quanteda,stopwords +#> 68: threshold 1 1 mlr3pipelines +#> 69: tomek 1 1 mlr3pipelines,themis +#> 70: tunethreshold 1 1 mlr3pipelines,bbotk +#> 71: unbranch NA 1 mlr3pipelines +#> 72: vtreat 1 1 mlr3pipelines,vtreat +#> 73: yeojohnson 1 1 mlr3pipelines,bestNormalize #> key input.num output.num packages

    diff --git a/reference/mlr_pipeops_adas.html b/reference/mlr_pipeops_adas.html index fa27179e4..036a95592 100644 --- a/reference/mlr_pipeops_adas.html +++ b/reference/mlr_pipeops_adas.html @@ -139,6 +139,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_blsmote.html b/reference/mlr_pipeops_blsmote.html index 753b8089e..ee61844dd 100644 --- a/reference/mlr_pipeops_blsmote.html +++ b/reference/mlr_pipeops_blsmote.html @@ -147,6 +147,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_boxcox.html b/reference/mlr_pipeops_boxcox.html index 8a4632f1a..490035daa 100644 --- a/reference/mlr_pipeops_boxcox.html +++ b/reference/mlr_pipeops_boxcox.html @@ -138,6 +138,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_branch.html b/reference/mlr_pipeops_branch.html index dd47bf3be..2ffb36327 100644 --- a/reference/mlr_pipeops_branch.html +++ b/reference/mlr_pipeops_branch.html @@ -156,6 +156,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_chunk.html b/reference/mlr_pipeops_chunk.html index 9dd88e92c..78627db55 100644 --- a/reference/mlr_pipeops_chunk.html +++ b/reference/mlr_pipeops_chunk.html @@ -136,6 +136,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_classbalancing.html b/reference/mlr_pipeops_classbalancing.html index 1a9f970e5..120443d1c 100644 --- a/reference/mlr_pipeops_classbalancing.html +++ b/reference/mlr_pipeops_classbalancing.html @@ -166,6 +166,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_classifavg.html b/reference/mlr_pipeops_classifavg.html index df733ccef..64b3fa884 100644 --- a/reference/mlr_pipeops_classifavg.html +++ b/reference/mlr_pipeops_classifavg.html @@ -165,6 +165,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_classweights.html b/reference/mlr_pipeops_classweights.html index 751b73a78..5163fd399 100644 --- a/reference/mlr_pipeops_classweights.html +++ b/reference/mlr_pipeops_classweights.html @@ -149,6 +149,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_colapply.html b/reference/mlr_pipeops_colapply.html index f019598e8..7b8bbbf1d 100644 --- a/reference/mlr_pipeops_colapply.html +++ b/reference/mlr_pipeops_colapply.html @@ -157,6 +157,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_collapsefactors.html b/reference/mlr_pipeops_collapsefactors.html index 847aa7483..d07649dfc 100644 --- a/reference/mlr_pipeops_collapsefactors.html +++ b/reference/mlr_pipeops_collapsefactors.html @@ -154,6 +154,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_colroles.html b/reference/mlr_pipeops_colroles.html index 7d1a9b3bf..0f0d506c1 100644 --- a/reference/mlr_pipeops_colroles.html +++ b/reference/mlr_pipeops_colroles.html @@ -120,6 +120,7 @@

    See alsomlr_pipeops_collapsefactors, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_copy.html b/reference/mlr_pipeops_copy.html index 04dc34bca..46ed1bc03 100644 --- a/reference/mlr_pipeops_copy.html +++ b/reference/mlr_pipeops_copy.html @@ -142,6 +142,7 @@

    See alsomlr_pipeops_collapsefactors, mlr_pipeops_colroles, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_datefeatures.html b/reference/mlr_pipeops_datefeatures.html index aae775391..36b555bf0 100644 --- a/reference/mlr_pipeops_datefeatures.html +++ b/reference/mlr_pipeops_datefeatures.html @@ -193,6 +193,7 @@

    See alsomlr_pipeops_collapsefactors, mlr_pipeops_colroles, mlr_pipeops_copy, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_decode.html b/reference/mlr_pipeops_decode.html new file mode 100644 index 000000000..c598de186 --- /dev/null +++ b/reference/mlr_pipeops_decode.html @@ -0,0 +1,338 @@ + +Reverse Factor Encoding — mlr_pipeops_decode • mlr3pipelines + Skip to contents + + +
    +
    +
    + +
    +

    Reverses one-hot or treatment encoding of columns. It collapses multiple numeric or integer columns into one factor +column based on a pre-specified grouping pattern of column names.

    +

    May be applied to multiple groups of columns, grouped by matching a common naming pattern. The grouping pattern is +extracted to form the name of the newly derived factor column, and levels are constructed from the previous column +names, with parts matching the grouping pattern removed (see examples). The level per row of the new factor column is generally +determined as the name of the column with the maximum value in the group.

    +
    + + +
    +

    Format

    +

    R6Class object inheriting from PipeOpTaskPreprocSimple/PipeOpTaskPreproc/PipeOp.

    +
    +
    +

    Construction

    + + + +

    PipeOpEncode$new(id = "decode", param_vals = list())

    • id :: character(1)
      +Identifier of resulting object, default "decode".

    • +
    • param_vals :: named list
      +List of hyperparameter settings, overwriting the hyperparameter settings that would otherwise be set during construction. Default list().

    • +
    +
    +

    Input and Output Channels

    + + +

    Input and output channels are inherited from PipeOpTaskPreproc.

    +

    The output is the input Task with encoding columns collapsed into new decoded columns.

    +
    +
    +

    State

    + + +

    The $state is a named list with the $state elements inherited from PipeOpTaskPreproc, as well as:

    • colmaps :: named list
      +Named list of named character vectors. Each element is named according to the new column name extracted by +group_pattern. Each vector contains the level names for the new factor column that should be created, named by +the corresponding old column name. If treatment_encoding is TRUE, then each vector also contains ref_name as the +reference class with an empty string as name.

    • +
    • treatment_encoding :: logical(1)
      +Value of treatment_encoding hyperparameter.

    • +
    • cutoff :: numeric(1)
      +Value of treatment_encoding hyperparameter, or 0 if that is not given.

    • +
    • ties_method :: character(1)
      +Value of ties_method hyperparameter.

    • +
    +
    +

    Parameters

    + + +

    The parameters are the parameters inherited from PipeOpTaskPreproc, as well as:

    • group_pattern :: character(1)
      +A regular expression to be applied to column names. Should contain a capturing group for the new +column name, and match everything that should not be interpreted as the new factor levels (which are constructed as +the difference between column names and what group_pattern matches). +If set to "", all columns matching the group_pattern are collapsed into one factor column called +pipeop.decoded. Use PipeOpRenameColumns to rename this column. +Initialized to "^([^.]+)\\.", which would extract everything up to the first dot as the new column name and +construct new levels as everything after the first dot.

    • +
    • treatment_encoding :: logical(1)
      +If TRUE, treatment encoding is assumed instead of one-hot encoding. Initialized to FALSE.

    • +
    • treatment_cutoff :: numeric(1)
      +If treatment_encoding is TRUE, specifies a cutoff value for identifying the reference level. The reference level +is set to ref_name in rows where the value is less than or equal to a specified cutoff value (e.g., 0) in all +columns in that group. Default is 0.

    • +
    • ref_name :: character(1)
      +If treatment_encoding is TRUE, specifies the name for reference levels. Default is "ref".

    • +
    • ties_method :: character(1)
      +Method for resolving ties if multiple columns have the same value. Specifies the value from which of the columns +with the same value is to be picked. Options are "first", "last", or "random". Initialized to "random".

    • +
    +
    +

    Methods

    + + +

    Only methods inherited from PipeOpTaskPreprocSimple/PipeOpTaskPreproc/PipeOp.

    +
    +
    +

    See also

    +

    https://mlr-org.com/pipeops.html

    +

    Other PipeOps: +PipeOp, +PipeOpEnsemble, +PipeOpImpute, +PipeOpTargetTrafo, +PipeOpTaskPreproc, +PipeOpTaskPreprocSimple, +mlr_pipeops, +mlr_pipeops_adas, +mlr_pipeops_blsmote, +mlr_pipeops_boxcox, +mlr_pipeops_branch, +mlr_pipeops_chunk, +mlr_pipeops_classbalancing, +mlr_pipeops_classifavg, +mlr_pipeops_classweights, +mlr_pipeops_colapply, +mlr_pipeops_collapsefactors, +mlr_pipeops_colroles, +mlr_pipeops_copy, +mlr_pipeops_datefeatures, +mlr_pipeops_encode, +mlr_pipeops_encodeimpact, +mlr_pipeops_encodelmer, +mlr_pipeops_featureunion, +mlr_pipeops_filter, +mlr_pipeops_fixfactors, +mlr_pipeops_histbin, +mlr_pipeops_ica, +mlr_pipeops_imputeconstant, +mlr_pipeops_imputehist, +mlr_pipeops_imputelearner, +mlr_pipeops_imputemean, +mlr_pipeops_imputemedian, +mlr_pipeops_imputemode, +mlr_pipeops_imputeoor, +mlr_pipeops_imputesample, +mlr_pipeops_kernelpca, +mlr_pipeops_learner, +mlr_pipeops_learner_pi_cvplus, +mlr_pipeops_learner_quantiles, +mlr_pipeops_missind, +mlr_pipeops_modelmatrix, +mlr_pipeops_multiplicityexply, +mlr_pipeops_multiplicityimply, +mlr_pipeops_mutate, +mlr_pipeops_nearmiss, +mlr_pipeops_nmf, +mlr_pipeops_nop, +mlr_pipeops_ovrsplit, +mlr_pipeops_ovrunite, +mlr_pipeops_pca, +mlr_pipeops_proxy, +mlr_pipeops_quantilebin, +mlr_pipeops_randomprojection, +mlr_pipeops_randomresponse, +mlr_pipeops_regravg, +mlr_pipeops_removeconstants, +mlr_pipeops_renamecolumns, +mlr_pipeops_replicate, +mlr_pipeops_rowapply, +mlr_pipeops_scale, +mlr_pipeops_scalemaxabs, +mlr_pipeops_scalerange, +mlr_pipeops_select, +mlr_pipeops_smote, +mlr_pipeops_smotenc, +mlr_pipeops_spatialsign, +mlr_pipeops_subsample, +mlr_pipeops_targetinvert, +mlr_pipeops_targetmutate, +mlr_pipeops_targettrafoscalerange, +mlr_pipeops_textvectorizer, +mlr_pipeops_threshold, +mlr_pipeops_tomek, +mlr_pipeops_tunethreshold, +mlr_pipeops_unbranch, +mlr_pipeops_updatetarget, +mlr_pipeops_vtreat, +mlr_pipeops_yeojohnson

    +
    + +
    +

    Examples

    +
    library("mlr3")
    +
    +# Reverse one-hot encoding
    +df = data.frame(
    +  target = runif(4),
    +  x.1 = rep(c(1, 0), 2),
    +  x.2 = rep(c(0, 1), 2),
    +  y.1 = rep(c(1, 0), 2),
    +  y.2 = rep(c(0, 1), 2),
    +  a = runif(4)
    +)
    +task_one_hot = TaskRegr$new(id = "example", backend = df, target = "target")
    +
    +pop = po("decode")
    +
    +train_out = pop$train(list(task_one_hot))[[1]]
    +# x.1 and x.2 are collapsed into x, same for y; a is ignored.
    +train_out$data()
    +#>       target          a      x      y
    +#>        <num>      <num> <fctr> <fctr>
    +#> 1: 0.2779660 0.06445754      1      1
    +#> 2: 0.7875405 0.75470562      2      2
    +#> 3: 0.7024625 0.62041003      1      1
    +#> 4: 0.1650276 0.16957677      2      2
    +
    +# Reverse treatment encoding from PipeOpEncode
    +df = data.frame(
    +  target = runif(6),
    +  fct = factor(rep(c("a", "b", "c"), 2))
    +)
    +task = TaskRegr$new(id = "example", backend = df, target = "target")
    +
    +po_enc = po("encode", method = "treatment")
    +task_encoded = po_enc$train(list(task))[[1]]
    +task_encoded$data()
    +#>        target fct.b fct.c
    +#>         <num> <num> <num>
    +#> 1: 0.06221405     0     0
    +#> 2: 0.10902927     1     0
    +#> 3: 0.38171635     0     1
    +#> 4: 0.16931091     0     0
    +#> 5: 0.29865254     1     0
    +#> 6: 0.19220954     0     1
    +
    +po_dec = po("decode", treatment_encoding = TRUE)
    +task_decoded = pop$train(list(task))[[1]]
    +# x.1 and x.2 are collapsed into x. All rows where all values
    +# are smaller or equal to 0, the level is set to the reference level.
    +task_decoded$data()
    +#>        target    fct
    +#>         <num> <fctr>
    +#> 1: 0.06221405      a
    +#> 2: 0.10902927      b
    +#> 3: 0.38171635      c
    +#> 4: 0.16931091      a
    +#> 5: 0.29865254      b
    +#> 6: 0.19220954      c
    +
    +# Different group_pattern
    +df = data.frame(
    +  target = runif(4),
    +  x_1 = rep(c(1, 0), 2),
    +  x_2 = rep(c(0, 1), 2),
    +  y_1 = rep(c(2, 0), 2),
    +  y_2 = rep(c(0, 1), 2)
    +)
    +task = TaskRegr$new(id = "example", backend = df, target = "target")
    +
    +# Grouped by first underscore
    +pop = po("decode", group_pattern = "^([^_]+)\\_")
    +train_out = pop$train(list(task))[[1]]
    +# x_1 and x_2 are collapsed into x, same for y
    +train_out$data()
    +#>       target      x      y
    +#>        <num> <fctr> <fctr>
    +#> 1: 0.2571700      1      1
    +#> 2: 0.1812318      2      2
    +#> 3: 0.4773137      1      1
    +#> 4: 0.7707370      2      2
    +
    +# Empty string to collapse all matches into one factor column.
    +pop$param_set$set_values(group_pattern = "")
    +train_out = pop$train(list(task))[[1]]
    +# All columns are combined into a single column.
    +# The level for each row is determined by the column with the largest value in that row.
    +# By default, ties are resolved randomly.
    +train_out$data()
    +#>       target pipeop.decoded
    +#>        <num>         <fctr>
    +#> 1: 0.2571700            y_1
    +#> 2: 0.1812318            y_2
    +#> 3: 0.4773137            y_1
    +#> 4: 0.7707370            x_2
    +
    +
    +
    +
    + + +
    + + + +
    + + + + + + + diff --git a/reference/mlr_pipeops_encode.html b/reference/mlr_pipeops_encode.html index d3fad1fd8..3d9c3bfac 100644 --- a/reference/mlr_pipeops_encode.html +++ b/reference/mlr_pipeops_encode.html @@ -147,6 +147,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, mlr_pipeops_featureunion, diff --git a/reference/mlr_pipeops_encodeimpact.html b/reference/mlr_pipeops_encodeimpact.html index 34681ffa6..e41bd7811 100644 --- a/reference/mlr_pipeops_encodeimpact.html +++ b/reference/mlr_pipeops_encodeimpact.html @@ -152,6 +152,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodelmer, mlr_pipeops_featureunion, diff --git a/reference/mlr_pipeops_encodelmer.html b/reference/mlr_pipeops_encodelmer.html index c8348f077..fe8addbc1 100644 --- a/reference/mlr_pipeops_encodelmer.html +++ b/reference/mlr_pipeops_encodelmer.html @@ -189,6 +189,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_featureunion, diff --git a/reference/mlr_pipeops_featureunion.html b/reference/mlr_pipeops_featureunion.html index cd8bb9941..344a115d3 100644 --- a/reference/mlr_pipeops_featureunion.html +++ b/reference/mlr_pipeops_featureunion.html @@ -180,6 +180,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, diff --git a/reference/mlr_pipeops_filter.html b/reference/mlr_pipeops_filter.html index 4760cc160..97f031336 100644 --- a/reference/mlr_pipeops_filter.html +++ b/reference/mlr_pipeops_filter.html @@ -176,6 +176,7 @@

    See alsomlr_pipeops_colroles, mlr_pipeops_copy, mlr_pipeops_datefeatures, +mlr_pipeops_decode, mlr_pipeops_encode, mlr_pipeops_encodeimpact, mlr_pipeops_encodelmer, @@ -278,36 +279,36 @@

    Exampleslearner = GraphLearner$new(gr) rr = resample(task, learner, rsmp("holdout"), store_models = TRUE) rr$learners[[1]]$model$auc$scores -#> charExclamation capitalLong capitalAve your -#> 3.290018e-01 3.084719e-01 2.924356e-01 2.850997e-01 +#> charExclamation capitalLong your capitalAve +#> 0.3238152005 0.3042322800 0.2875033175 0.2871065413 #> charDollar capitalTotal free you -#> 2.760477e-01 2.690304e-01 2.328002e-01 2.133331e-01 +#> 0.2764362681 0.2662379684 0.2320238685 0.2143728547 #> our remove money all -#> 2.127344e-01 2.049659e-01 1.848303e-01 1.800999e-01 +#> 0.2098176687 0.2046412205 0.1818790031 0.1816593829 #> hp num000 business over -#> 1.768315e-01 1.592152e-01 1.529875e-01 1.490547e-01 -#> mail internet hpl george -#> 1.395390e-01 1.362281e-01 1.362075e-01 1.341867e-01 +#> 0.1748898581 0.1585216214 0.1501428748 0.1415560087 +#> internet george mail hpl +#> 0.1348769419 0.1342355533 0.1334216533 0.1326369475 #> email receive address order -#> 1.316039e-01 1.303801e-01 1.246968e-01 1.142778e-01 +#> 0.1325690488 0.1315892724 0.1237574755 0.1168579037 #> make num1999 charHash credit -#> 1.090133e-01 1.049933e-01 1.024926e-01 9.926152e-02 -#> will people labs addresses -#> 9.423281e-02 9.040350e-02 7.689188e-02 7.541491e-02 -#> num650 num85 edu lab -#> 6.979414e-02 6.939648e-02 6.787860e-02 6.004967e-02 -#> technology telnet meeting data -#> 5.498094e-02 5.137943e-02 4.946566e-02 4.597672e-02 -#> pm report project num857 -#> 3.984151e-02 3.941819e-02 3.742082e-02 3.490039e-02 -#> charSquarebracket num415 original conference -#> 3.485239e-02 3.285303e-02 2.864972e-02 2.808021e-02 -#> cs re font charSemicolon -#> 2.658932e-02 2.658113e-02 2.309021e-02 2.247249e-02 +#> 0.1089995665 0.1046412205 0.0998692894 0.0988800028 +#> will people addresses labs +#> 0.0958661400 0.0913733235 0.0742654995 0.0736150430 +#> edu num650 num85 lab +#> 0.0700172954 0.0699748310 0.0686686100 0.0592269277 +#> technology meeting telnet data +#> 0.0532025196 0.0529178757 0.0527411621 0.0435513907 +#> pm report project charSquarebracket +#> 0.0391912753 0.0380785767 0.0378828426 0.0351343820 +#> num857 num415 original conference +#> 0.0343571959 0.0325759050 0.0297613150 0.0283529141 +#> cs charSemicolon re font +#> 0.0268617962 0.0264183534 0.0260759846 0.0222261050 #> charRoundbracket direct num3d table -#> 1.810618e-02 1.206585e-02 9.208792e-03 2.783626e-03 +#> 0.0219286334 0.0131568704 0.0093397236 0.0053856736 #> parts -#> 5.883081e-05 +#> 0.0007809459