PPPFunctionLink {SBCK} | R Documentation |
PPPFunctionLink
Description
Base class to build link function pre-post processing class. See also the PrePostProcessing documentation
Details
This class is used to define pre/post processing class with a link function and its inverse. See example.
Super class
SBCK::PrePostProcessing
-> PPPFunctionLink
Methods
Public methods
Inherited methods
Method new()
Create a new PPPFunctionLink object.
Usage
PPPFunctionLink$new(transform_, itransform_, cols = NULL, ...)
Arguments
transform_
The transform function
itransform_
The inverse transform function
cols
Columns to apply the link function
...
Others arguments are passed to PrePostProcessing
Returns
A new 'PPPFunctionLink' object.
Method transform()
Apply the transform.
Usage
PPPFunctionLink$transform(X)
Arguments
X
Data to transform
Returns
Xt a transformed matrix
Method itransform()
Apply the inverse transform.
Usage
PPPFunctionLink$itransform(Xt)
Arguments
Xt
Data to transform
Returns
X a transformed matrix
Method clone()
The objects of this class are cloneable with this method.
Usage
PPPFunctionLink$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.
Examples
## Start with data
XY = SBCK::dataset_like_tas_pr(2000)
X0 = XY$X0
X1 = XY$X1
Y0 = XY$Y0
## Define the link function
transform = function(x) { return(x^3) }
itransform = function(x) { return(x^(1/3)) }
## And the PPP method
ppp = PPPFunctionLink$new( bc_method = CDFt , transform = transform ,
itransform = itransform )
## And now the correction
## Bias correction
ppp$fit(Y0,X0,X1)
Z = ppp$predict(X1,X0)
[Package SBCK version 1.0.0 Index]