rangerQuants.Rd
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.
A data.frame
with data to be used for quantile
regression.
A logical(1L)
indicating whether the protected
attribute A
is a root node of the causal graph. Used for splitting the
quantile regression.
A logical
vector of length nrow(data)
, indicating
which
samples have the baseline value of the protected attribute.
Forwarded to ranger::ranger()
.
Forwarded to further methods.
Forwarded to quantreg::rq()
or qrnn::mcqrnn.fit()
.
Forwarded to qrnn::mcqrnn.fit()
.
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()
.
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.