rangerQuants {fairadapt} | R Documentation |
Quantile Engine Constructor for the Quantile Learning step.
Description
There are several methods that can be used for the quantile learning step
in the fairadapt
package. Each of the methods needs a specific
constructor. The constructor is a function that takes the data (with some
additional meta-information) and returns an object on which the
computeQuants()
generic can be called.
Usage
rangerQuants(data, A.root, ind, min.node.size = 20, ...)
linearQuants(
data,
A.root,
ind,
tau = c(0.001, seq(0.005, 0.995, by = 0.01), 0.999),
...
)
mcqrnnQuants(
data,
A.root,
ind,
tau = seq(0.005, 0.995, by = 0.01),
iter.max = 500,
...
)
Arguments
data |
A |
A.root |
A |
ind |
A |
min.node.size |
Forwarded to |
... |
Forwarded to further methods. |
tau |
Forwarded to |
iter.max |
Forwarded to |
Details
Within the package, there are 3 different methods implemented, which use
quantile regressors based on linear models, random forests and neural
networks. However, there is additional flexibility and the user can provide
her/his own quantile method. For this, the user needs to write (i) the
constructor which returns an S3 classed object (see examples below);
(ii) a method for the computeQuants()
generic for the S3 class
returned in (i).
The rangerQuants()
function uses random forests
(ranger
package) for quantile regression.
The linearQuants()
function uses linear quantile regression
(quantreg
package) for the Quantile Learning step.
The mcqrnnQuants()
function uses monotone quantile
regression neural networks (mcqrnn
package) in the Quantile Learning step.
Value
A ranger
or a rangersplit
S3 object, depending on the
value of the A.root
argument, for rangerQuants()
.
A rqs
or a quantregsplit
S3 object, depending on the
value of the A.root
argument, for linearQuants()
.
An mcqrnn
S3 object for mcqrnnQuants()
.