Skip to content

Commit 96422c7

Browse files
authored
0.4.4
1 parent 5c80fc1 commit 96422c7

21 files changed

+52
-51
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ test/testthat/snaps
77
docs/
88
docs
99
/doc/
10+
.DS_Store
1011
/Meta/
12+
CRAN-SUBMISSION

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: mcboost
22
Type: Package
33
Title: Multi-Calibration Boosting
4-
Version: 0.4.3-9000
4+
Version: 0.4.4
55
Authors@R:
66
c(person(given = "Florian",
77
family = "Pfisterer",
@@ -69,7 +69,7 @@ Suggests:
6969
covr,
7070
testthat (>= 3.1.0)
7171
Roxygen: list(markdown = TRUE, r6 = TRUE)
72-
RoxygenNote: 7.3.1
72+
RoxygenNote: 7.3.2
7373
VignetteBuilder: knitr
7474
Collate:
7575
'AuditorFitters.R'

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# dev
22

3+
# mcboost 0.4.4
4+
5+
* Fix link anchors
6+
37
# mcboost 0.4.3
48

59
* Compatibility with upcoming 'paradox' release.

R/MCBoost.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@ MCBoost = R6::R6Class("MCBoost",
219219
labels = private$assert_labels(labels, ...)
220220
pred_probs = private$assert_prob(do.call(self$predictor, discard(list(data, predictor_args), is.null)), data, ...)
221221
buckets = private$create_buckets(pred_probs)
222-
223222
# Compute residuals and multiply with weighting for low-degree MC.
224223
resid = private$compute_residuals(pred_probs, labels)
225224
weighted_preds = private$compute_weighted_preds(pred_probs)
@@ -285,7 +284,7 @@ MCBoost = R6::R6Class("MCBoost",
285284
},
286285
#' @description
287286
#' Predict a dataset with multi-calibrated predictions
288-
#' @param x [`data.table`] \cr
287+
#' @param x [`data.table`][data.table::data.table] \cr
289288
#' Prediction data.
290289
#' @param t [`integer`] \cr
291290
#' Number of multi-calibration steps to predict. Default: `Inf` (all).
@@ -320,7 +319,7 @@ MCBoost = R6::R6Class("MCBoost",
320319
#' Compute the auditor effect for each instance which are the cumulative
321320
#' absolute predictions of the auditor. It indicates "how much"
322321
#' each observation was affected by multi-calibration on average across iterations.
323-
#' @param x [`data.table`] \cr
322+
#' @param x [`data.table`][data.table::data.table] \cr
324323
#' Prediction data.
325324
#' @param aggregate [`logical`] \cr
326325
#' Should the auditor effect be aggregated across iterations? Defaults to `TRUE`.

R/PipeOpLearnerPred.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#'
33
#' @usage NULL
44
#' @name mlr_pipeops_mcboost
5-
#' @format [`R6Class`] inheriting from [`mlr3pipelines::PipeOp`].
5+
#' @format [`R6Class`][R6::R6Class] inheriting from [`mlr3pipelines::PipeOp`].
66
#'
77
#' @description
88
#' [`mlr3pipelines::PipeOp`] that trains a [`Learner`][mlr3::Learner] and passes its predictions forward during training and prediction.
@@ -33,17 +33,17 @@
3333
#' [`mlr3pipelines::PipeOpTaskPreproc`]. It is a named `list` with the inherited members, as well as:
3434
#' * `model` :: `any`\cr
3535
#' Model created by the [`Learner`][mlr3::Learner]'s `$.train()` function.
36-
#' * `train_log` :: [`data.table`] with columns `class` (`character`), `msg` (`character`)\cr
36+
#' * `train_log` :: [`data.table`][data.table::data.table] with columns `class` (`character`), `msg` (`character`)\cr
3737
#' Errors logged during training.
3838
#' * `train_time` :: `numeric(1)`\cr
3939
#' Training time, in seconds.
40-
#' * `predict_log` :: `NULL` | [`data.table`] with columns `class` (`character`), `msg` (`character`)\cr
40+
#' * `predict_log` :: `NULL` | [`data.table`][data.table::data.table] with columns `class` (`character`), `msg` (`character`)\cr
4141
#' Errors logged during prediction.
4242
#' * `predict_time` :: `NULL` | `numeric(1)`
4343
#' Prediction time, in seconds.
4444
#'
4545
#' @section Fields:
46-
#' Fields inherited from [`PipeOp`], as well as:
46+
#' Fields inherited from [`PipeOp`][mlr3pipelines::PipeOp], as well as:
4747
#' * `learner` :: [`Learner`][mlr3::Learner]\cr
4848
#' [`Learner`][mlr3::Learner] that is being wrapped. Read-only.
4949
#' * `learner_model` :: [`Learner`][mlr3::Learner]\cr
@@ -61,7 +61,7 @@ PipeOpLearnerPred = R6Class("PipeOpLearnerPred",
6161
#' @description
6262
#' Initialize a Learner Predictor PipeOp. Can be used to wrap trained or untrainted
6363
#' mlr3 learners.
64-
#' @param learner [`Learner`]\cr
64+
#' @param learner [`Learner`][mlr3::Learner]\cr
6565
#' The learner that should be wrapped.
6666
#' @param id [`character`] \cr
6767
#' The `PipeOp`'s id. Defaults to "mcboost".

R/PipeOpMCBoost.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
#'
33
#' @usage NULL
44
#' @name mlr_pipeops_mcboost
5-
#' @format [`R6Class`] inheriting from [`mlr3pipelines::PipeOp`].
5+
#' @format [`R6Class`][R6::R6Class] inheriting from [`mlr3pipelines::PipeOp`].
66
#'
77
#' @description
88
#' Post-process a learner prediction using multi-calibration.
9-
#' For more details, please refer to \url{https://arxiv.org/pdf/1805.12317.pdf} (Kim et al. 2018)
9+
#' For more details, please refer to \url{http://arxiv.org/pdf/1805.12317} (Kim et al. 2018)
1010
#' or the help for [`MCBoost`].
1111
#' If no `init_predictor` is provided, the preceding learner's predictions
1212
#' corresponding to the `prediction` slot are used as an initial predictor for `MCBoost`.

R/PipelineMCBoost.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#' Note: An initial predictor can also be supplied via the `init_predictor` parameter.
1212
#' @param param_vals `list` \cr
1313
#' List of parameter values passed on to `MCBoost$new`.
14-
#' @return (mlr3pipelines) [`Graph`]
14+
#' @return (mlr3pipelines) [`Graph`][mlr3pipelines::Graph]
1515
#' @examples
1616
#' \dontrun{
1717
#' library("mlr3pipelines")

R/Predictor.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Predictor = R6::R6Class("Predictor",
1616
},
1717
#' @description
1818
#' Predict a dataset with constant predictions.
19-
#' @param data [`data.table`] \cr
20-
#' Prediction data.
19+
#' @param data [`data.table`][data.table::data.table] \cr
20+
#r Prediction data.
2121
#' @param ... [`any`] \cr
2222
#' Not used, only for compatibility with other methods.
2323
predict = function(data, ...) {
@@ -56,7 +56,7 @@ ConstantPredictor = R6::R6Class("ConstantPredictor",
5656
},
5757
#' @description
5858
#' Predict a dataset with constant predictions.
59-
#' @param data [`data.table`] \cr
59+
#' @param data [`data.table`][data.table::data.table] \cr
6060
#' Prediction data.
6161
#' @param ... [`any`] \cr
6262
#' Not used, only for compatibility with other methods.
@@ -95,7 +95,7 @@ LearnerPredictor = R6::R6Class("LearnerPredictor",
9595
},
9696
#' @description
9797
#' Predict a dataset with leaner predictions.
98-
#' @param data [`data.table`] \cr
98+
#' @param data [`data.table`][data.table::data.table] \cr
9999
#' Prediction data.
100100
#' @param ... [`any`] \cr
101101
#' Not used, only for compatibility with other methods.
@@ -169,7 +169,7 @@ SubpopPredictor = R6::R6Class("SubpopPredictor",
169169
},
170170
#' @description
171171
#' Predict a dataset with sub-population predictions.
172-
#' @param data [`data.table`] \cr
172+
#' @param data [`data.table`][data.table::data.table] \cr
173173
#' Prediction data.
174174
#' @param ... [`any`] \cr
175175
#' Not used, only for compatibility with other methods.
@@ -211,7 +211,7 @@ SubgroupModel = R6::R6Class("SubgroupModel",
211211
},
212212
#' @description
213213
#' Predict a dataset with sub-population predictions.
214-
#' @param data [`data.table`] \cr
214+
#' @param data [`data.table`][data.table::data.table] \cr
215215
#' Prediction data.
216216
#' @param subgroup_masks [`list`] \cr
217217
#' List of subgroup masks for the data.
@@ -274,7 +274,7 @@ CVLearnerPredictor = R6::R6Class("CVLearnerPredictor",
274274
},
275275
#' @description
276276
#' Predict a dataset with leaner predictions.
277-
#' @param data [`data.table`] \cr
277+
#' @param data [`data.table`][data.table::data.table] \cr
278278
#' Prediction data.
279279
#' @param ... [`any`] \cr
280280
#' Not used, only for compatibility with other methods.

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
## What does it do?
1313

14-
**mcboost** implements Multi-Calibration Boosting ([Hebert-Johnson et al., 2018](https://proceedings.mlr.press/v80/hebert-johnson18a.html); [Kim et al., 2019](https://arxiv.org/pdf/1805.12317.pdf)) for the multi-calibration of a machine learning model's prediction. Multi-Calibration works best in scenarios where the underlying data & labels are unbiased but a bias is introduced within the algorithm's fitting procedure. This is often the case, e.g. when an algorithm fits a majority population while ignoring or under-fitting minority populations.
14+
**mcboost** implements Multi-Calibration Boosting ([Hebert-Johnson et al., 2018](https://proceedings.mlr.press/v80/hebert-johnson18a.html); [Kim et al., 2019](https://arxiv.org/pdf/1805.12317)) for the multi-calibration of a machine learning model's prediction. Multi-Calibration works best in scenarios where the underlying data & labels are unbiased but a bias is introduced within the algorithm's fitting procedure. This is often the case, e.g. when an algorithm fits a majority population while ignoring or under-fitting minority populations.
1515

1616
For more information and example, see the package's [website](https://mlr-org.github.io/mcboost/).
1717

@@ -99,7 +99,7 @@ mc$predict_probs(test_data)
9999

100100
### Multi-Calibration
101101

102-
While `mcboost` in its defaults implements Multi-Accuracy ([Kim et al., 2019](https://arxiv.org/pdf/1805.12317.pdf)),
102+
While `mcboost` in its defaults implements Multi-Accuracy ([Kim et al., 2019](http://arxiv.org/pdf/1805.12317)),
103103
it can also multi-calibrate predictors ([Hebert-Johnson et al., 2018](http://proceedings.mlr.press/v80/hebert-johnson18a.html)).
104104
In order to achieve this, we have to set the following hyperparameters:
105105

@@ -152,7 +152,7 @@ If you use `mcboost`, please cite our package as well as the two papers it is ba
152152

153153
```
154154
@article{pfisterer2021,
155-
author = {Pfisterer, Florian and Kern, Christoph and Dandl, Susanne and Sun, Matthew and
155+
author = {Pfisterer, Florian and Kern, Christoph and Dandl, Susanne and Sun, Matthew and
156156
Kim, Michael P. and Bischl, Bernd},
157157
title = {mcboost: Multi-Calibration Boosting for R},
158158
journal = {Journal of Open Source Software},

attic/PipeOpMCBoostSurv.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
#'
33
#' @usage NULL
44
#' @name mlr_pipeops_mcboostsurv
5-
#' @format [`R6Class`] inheriting from [`mlr3pipelines::PipeOp`].
5+
#' @format [`R6Class`][R6::R6Class] inheriting from [`PipeOp`][mlr3pipelines::PipeOp].
66
#'
77
#' @description
88
#' Post-process a survival learner prediction using multi-calibration.
9-
#' For more details, please refer to \url{https://arxiv.org/pdf/1805.12317.pdf} (Kim et al. 2018)
9+
#' For more details, please refer to \url{https://arxiv.org/pdf/1805.12317} (Kim et al. 2018)
1010
#' or the help for [`MCBoostSurv`].
1111
#' If no `init_predictor` is provided, the preceding learner's predictions
1212
#' corresponding to the `prediction` slot are used as an initial predictor for `MCBoostSurv`.
@@ -87,7 +87,7 @@ PipeOpMCBoostSurv = R6Class("PipeOpMCBoostSurv",
8787
super$initialize(id,
8888
param_set = param_set, param_vals = param_vals, packages = c("mlr3proba", "survival"),
8989
input = data.table(
90-
name = c("data", "prediction"),
90+
name = c("data", "prediction"),
9191
train = c("TaskSurv", "TaskSurv"),
9292
predict = c("TaskSurv", "TaskSurv")
9393
),
@@ -162,7 +162,7 @@ PipeOpMCBoostSurv = R6Class("PipeOpMCBoostSurv",
162162
#' All parameters can be adjusted through the resulting Graph's `param_set`.
163163
#' @param param_vals `list` \cr
164164
#' List of parameter values passed on to `MCBoostSurv$new`
165-
#' @return (mlr3pipelines) [`Graph`]
165+
#' @return (mlr3pipelines) [`Graph`][mlr3pipelines::Graph]
166166
#' @examples
167167
#' library("mlr3pipelines")
168168
#' gr = ppl_mcboostsurv()

0 commit comments

Comments
 (0)