Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check with new paradox #346

Merged
merged 10 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/dev-cmd-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
matrix:
config:
- {os: ubuntu-latest, r: 'release', dev-package: 'mlr-org/mlr3'}
- {os: ubuntu-latest, r: 'release', dev-package: "mlr-org/mlr3viz', 'mlr-org/mlr3pipelines', 'mlr-org/paradox"}

steps:
- uses: actions/checkout@v4
Expand All @@ -41,7 +42,7 @@ jobs:
needs: check

- name: Install dev versions
run: pak::pkg_install('${{ matrix.config.dev-package }}')
run: pak::pkg_install(c('${{ matrix.config.dev-package }}'))
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: mlr3proba
Title: Probabilistic Supervised Learning for 'mlr3'
Version: 0.6.0
Version: 0.6.0-9000
Authors@R:
c(person(given = "Raphael",
family = "Sonabend",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# mlr3proba 0.6.0-9000

* Compatibility with upcoming 'paradox' release.

# mlr3proba 0.6.0

* Optimized `surv.logloss` and `calib_alpha` measures (bypassing `distr6`)
Expand Down
12 changes: 7 additions & 5 deletions R/PipeOpBreslow.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,21 @@ PipeOpBreslow = R6Class("PipeOpBreslow",

# id of the PipeOp is the id of the learner
private$.learner = as_learner(learner, clone = TRUE)
private$.learner$param_set$set_id = ""
id = id %??% private$.learner$id

# define `breslow.overwrite` parameter
private$.breslow_ps = ps(
overwrite = p_lgl(default = FALSE, tags = c("predict", "required"))
overwrite = p_lgl(tags = c("predict", "required"))
)
private$.breslow_ps$values = list(overwrite = FALSE)
private$.breslow_ps$set_id = "breslow"

if ("set_id" %in% names(private$.learner$param_set)) {
# old paradox
private$.learner$param_set$set_id = ""
private$.breslow_ps$set_id = "breslow"
}
super$initialize(
id = id,
param_set = alist(private$.breslow_ps, private$.learner$param_set),
param_set = alist(breslow = private$.breslow_ps, private$.learner$param_set),
param_vals = param_vals,
input = data.table(name = "input", train = "TaskSurv", predict = "TaskSurv"),
output = data.table(name = "output", train = "NULL", predict = "PredictionSurv"),
Expand Down
6 changes: 3 additions & 3 deletions R/TaskGeneratorSimsurv.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ TaskGeneratorSimsurv = R6Class("TaskGeneratorSimsurv",
initialize = function() {
ps = ps(
dist = p_fct(levels = c("weibull", "exponential", "gompertz"), default = "weibull"),
lambdas = p_dbl(lower = 0, default = 0.1, tags = "required"),
gammas = p_dbl(lower = 0, default = 1.5, tags = "required"),
maxt = p_dbl(lower = 0, default = 5, tags = "required")
lambdas = p_dbl(lower = 0, tags = "required"),
gammas = p_dbl(lower = 0, tags = "required"),
maxt = p_dbl(lower = 0, tags = "required")
)
ps$values = list(lambdas = 0.1, gammas = 1.5, maxt = 5)

Expand Down