cpoCbind: "cbind" the Result of Multiple CPOs

Description Usage Arguments Value General CPO info Calling a CPOConstructor See Also

View source: R/CPO_cbind.R

Description

This is a CPOConstructor to be used to create a CPO. It is called like any R function and returns the created CPO.

Build a CPO that represents the operations of its input parameters, performed in parallel and put together column wise.

For example, to construct a Task that contains the original data, as well as the data after scaling, one could do

task %>>% cpoCbind(NULLCPO, cpoScale())

The result of cpoCbind is itself a CPO which exports its constituents' hyperparameters. CPOs with the same type / ID get combined automatically. To get networks, e.g. of the form

1
2
3
      ,-C--E-.
     /    /   \
A---B----D-----F---G

one coul use the code

1
2
3
4
initcpo = A %>>% B
route1 = initcpo %>>% D
route2 = cpoCbind(route1, initcpo %>>% C) %>>% E
result = cpoCbind(route1, route2) %>>% F %>>% G

cpoCbind finds common paths among its arguments and combines them into one operation. This saves computation and makes it possible for one exported hyperparameter to influence multiple of cpoCbind's inputs. However, if you want to use the same operation with different parameters on different parts of cpoCbind input, you must give these operations different IDs. If CPOs that could represent an identical CPO, with the same IDs (or both with IDs absent) but different parameter settings, affect.* settings or different parameter exportations occur, an error will be thrown.

Usage

1
cpoCbind(..., .cpos = list())

Arguments

...

[CPO]
The CPOs to cbind. These must be Feature Operation CPOs. Named arguments will result in the respective columns being prefixed with the name. This is highly recommended if there is any chance of name collision otherwise. it is possible to use the same name multiple times (provided the resulting column names don't clash).

.cpos

[list of CPO]
Alternatively, give the CPOs to cbind as a list. Default is list().

Value

[CPO].

General CPO info

This function creates a CPO object, which can be applied to Tasks, data.frames, link{Learner}s and other CPO objects using the %>>% operator.

The parameters of this object can be changed after creation using the function setHyperPars. The other hyper-parameter manipulating functins, getHyperPars and getParamSet similarly work as one expects.

If the “id” parameter is given, the hyperparameters will have this id as aprefix; this will, however, not change the parameters of the creator function.

Calling a CPOConstructor

CPO constructor functions are called with optional values of parameters, and additional “special” optional values. The special optional values are the id parameter, and the affect.* parameters. The affect.* parameters enable the user to control which subset of a given dataset is affected. If no affect.* parameters are given, all data features are affected by default.

See Also

Other CPOs: cpoApplyFunRegrTarget, cpoApplyFun, cpoAsNumeric, cpoCache, cpoCollapseFact, cpoDropConstants, cpoDummyEncode, cpoFilterAnova, cpoFilterCarscore, cpoFilterChiSquared, cpoFilterFeatures, cpoFilterGainRatio, cpoFilterInformationGain, cpoFilterKruskal, cpoFilterLinearCorrelation, cpoFilterOneR, cpoFilterPermutationImportance, cpoFilterRankCorrelation, cpoFilterRelief, cpoFilterRfCImportance, cpoFilterRfImportance, cpoFilterRfSRCImportance, cpoFilterRfSRCMinDepth, cpoFilterSymmetricalUncertainty, cpoFilterUnivariate, cpoFilterVariance, cpoFixFactors, cpoIca, cpoImpactEncodeClassif, cpoImpactEncodeRegr, cpoImputeConstant, cpoImputeHist, cpoImputeLearner, cpoImputeMax, cpoImputeMean, cpoImputeMedian, cpoImputeMin, cpoImputeMode, cpoImputeNormal, cpoImputeUniform, cpoImpute, cpoLogTrafoRegr, cpoMakeCols, cpoMissingIndicators, cpoModelMatrix, cpoOversample, cpoPca, cpoProbEncode, cpoQuantileBinNumerics, cpoRegrResiduals, cpoResponseFromSE, cpoSample, cpoScaleMaxAbs, cpoScaleRange, cpoScale, cpoSelect, cpoSmote, cpoSpatialSign, cpoTransformParams, cpoWrap, makeCPOCase, makeCPOMultiplex

Other special CPOs: cpoTransformParams, cpoWrap, makeCPOCase, makeCPOMultiplex


mlr-org/mlrCPO documentation built on Feb. 4, 2019, 12:16 p.m.