SubgroupAuditorFitter {mcboost} | R Documentation |
Used to assess multi-calibration based on a list of
binary subgroup_masks
passed during initialization.
list
with items
corr
: pseudo-correlation between residuals and learner prediction.
l
: the trained learner.
mcboost::AuditorFitter
-> SubgroupAuditorFitter
subgroup_masks
list
List of subgroup masks.
Initialize a SubgroupAuditorFitter
new()
Initializes a SubgroupAuditorFitter
that
assesses multi-calibration within each group defined
by the ‘subpops’.
SubgroupAuditorFitter$new(subgroup_masks)
subgroup_masks
list
List of subgroup masks. Subgroup masks are list(s) of integer masks,
each with the same length as data to be fitted on.
They allow defining subgroups of the data.
fit()
Fit the learner and compute correlation
SubgroupAuditorFitter$fit(data, resid, mask)
data
data.table
Features.
resid
numeric
Residuals (of same length as data).
mask
integer
Mask applied to the data. Only used for SubgroupAuditorFitter
.
clone()
The objects of this class are cloneable with this method.
SubgroupAuditorFitter$clone(deep = FALSE)
deep
Whether to make a deep clone.
Other AuditorFitter:
CVLearnerAuditorFitter
,
LearnerAuditorFitter
,
SubpopAuditorFitter
library("data.table")
data = data.table(
"AGE_0_10" = c(1, 1, 0, 0, 0),
"AGE_11_20" = c(0, 0, 1, 0, 0),
"AGE_21_31" = c(0, 0, 0, 1, 1),
"X1" = runif(5),
"X2" = runif(5)
)
label = c(1,0,0,1,1)
masks = list(
"M1" = c(1L, 0L, 1L, 1L, 0L),
"M2" = c(1L, 0L, 0L, 0L, 1L)
)
sg = SubgroupAuditorFitter$new(masks)