SubpopAuditorFitter {mcboost}R Documentation

Static AuditorFitter based on Subpopulations

Description

Used to assess multi-calibration based on a list of binary valued columns: subpops passed during initialization.

Value

AuditorFitter

list with items

Super class

mcboost::AuditorFitter -> SubpopAuditorFitter

Public fields

subpops

list
List of subpopulation indicators. Initialize a SubpopAuditorFitter

Methods

Public methods

Inherited methods

Method new()

Initializes a SubpopAuditorFitter that assesses multi-calibration within each group defined by the ⁠subpops'. Names in ⁠subpops' must correspond to columns in the data.

Usage
SubpopAuditorFitter$new(subpops)
Arguments
subpops

list
Specifies a collection of characteristic attributes and the values they take to define subpopulations e.g. list(age = c('20-29','30-39','40+'), nJobs = c(0,1,2,'3+'), ,..).


Method fit()

Fit the learner and compute correlation

Usage
SubpopAuditorFitter$fit(data, resid, mask)
Arguments
data

data.table
Features.

resid

numeric
Residuals (of same length as data).

mask

integer
Mask applied to the data. Only used for SubgroupAuditorFitter.


Method clone()

The objects of this class are cloneable with this method.

Usage
SubpopAuditorFitter$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Other AuditorFitter: CVLearnerAuditorFitter, LearnerAuditorFitter, SubgroupAuditorFitter

Examples

  library("data.table")
  data = data.table(
    "AGE_NA" = c(0, 0, 0, 0, 0),
    "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)
  pops = list("AGE_NA", "AGE_0_10", "AGE_11_20", "AGE_21_31", function(x) {x[["X1" > 0.5]]})
  sf = SubpopAuditorFitter$new(subpops = pops)
  sf$fit(data, label - 0.5)

[Package mcboost version 0.4.3 Index]