Skip to content
Open
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 .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ linters: linters_with_defaults(
object_name_linter = object_name_linter(c("snake_case", "CamelCase")), # only allow snake case and camel case object names
cyclocomp_linter = NULL, # do not check function complexity
commented_code_linter = NULL, # allow code in comments
line_length_linter = line_length_linter(120)
line_length_linter = line_length_linter(120),
indentation_linter = indentation_linter(indent = 2, hanging_indent_style = "never")
)

3 changes: 3 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ Depends:
R (>= 3.1.0)
Suggests:
mlr3 (>= 0.13.3)
Remotes:
mlr-org/mlr3misc@common_baseclass,
mlr-org/mlr3@common_baseclass
Encoding: UTF-8
LazyData: true
LazyDataCompression: xz
Expand Down
4 changes: 2 additions & 2 deletions R/ames_housing.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NULL

get_ames_housing_task = function() {
b = as_backend("ames_housing")
task = mlr3::TaskRegr$new("ames_housing", b, target = "Sale_Price", label = "Ames House Sales")
b$hash = task$man = "mlr3data::mlr_tasks_ames_housing"
task = mlr3::TaskRegr$new("ames_housing", b, target = "Sale_Price")
task$override_info(man = "mlr3data::mlr_tasks_ames_housing", hash = "mlr3data::mlr_tasks_ames_housing")
task
}
4 changes: 2 additions & 2 deletions R/bike_sharing.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ NULL

get_bike_sharing_task = function() {
b = as_backend("bike_sharing")
task = mlr3::TaskRegr$new("bike_sharing", b, target = "count", label = "Bike Sharing Demand")
b$hash = task$man = "mlr3data::mlr_tasks_bike_sharing"
task = mlr3::TaskRegr$new("bike_sharing", b, target = "count")
task$override_info(man = "mlr3data::mlr_tasks_bike_sharing", hash = "mlr3data::mlr_tasks_bike_sharing")
task
}
4 changes: 2 additions & 2 deletions R/ilpd.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ NULL

get_ilpd_task = function() {
b = as_backend("ilpd")
task = mlr3::TaskClassif$new("ilpd", b, target = "diseased", positive = "yes", label = "Indian Liver Patient Data")
b$hash = task$man = "mlr3data::mlr_tasks_ilpd"
task = mlr3::TaskClassif$new("ilpd", b, target = "diseased", positive = "yes")
task$override_info(man = "mlr3data::mlr_tasks_ilpd", hash = "mlr3data::mlr_tasks_ilpd")
task
}
4 changes: 2 additions & 2 deletions R/kc_housing.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ NULL

get_kc_housing_task = function() {
b = as_backend("kc_housing")
task = mlr3::TaskRegr$new("kc_housing", b, target = "price", label = "King County House Sales")
b$hash = task$man = "mlr3data::mlr_tasks_kc_housing"
task = mlr3::TaskRegr$new("kc_housing", b, target = "price")
task$override_info(man = "mlr3data::mlr_tasks_kc_housing", hash = "mlr3data::mlr_tasks_kc_housing")
task
}
4 changes: 2 additions & 2 deletions R/moneyball.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ NULL

get_moneyball_task = function() {
b = as_backend("moneyball")
task = mlr3::TaskRegr$new("moneyball", b, target = "rs", label = "Major League Baseball Statistics")
b$hash = task$man = "mlr3data::mlr_tasks_moneyball"
task = mlr3::TaskRegr$new("moneyball", b, target = "rs")
task$override_info(man = "mlr3data::mlr_tasks_moneyball", hash = "mlr3data::mlr_tasks_moneyball")
task
}
5 changes: 2 additions & 3 deletions R/optdigits.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ NULL

get_optdigits_task = function() {
b = as_backend("optdigits")
task = mlr3::TaskClassif$new("optdigits", b, target = "binaryclass", positive = "P",
label = "Optical Recognition of Handwritten Digits")
b$hash = task$man = "mlr3data::mlr_tasks_optdigits"
task = mlr3::TaskClassif$new("optdigits", b, target = "binaryclass", positive = "P")
task$override_info(man = "mlr3data::mlr_tasks_optdigits", hash = "mlr3data::mlr_tasks_optdigits")
task
}
4 changes: 2 additions & 2 deletions R/penguins_simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ NULL

get_penguins_simple_task = function() {
b = as_backend("penguins_simple")
task = mlr3::TaskClassif$new("penguins", b, target = "species", label = "Simplified Palmer Penguins")
b$hash = task$man = "mlr3data::mlr_tasks_penguins_simple"
task = mlr3::TaskClassif$new("penguins", b, target = "species")
task$override_info(man = "mlr3data::mlr_tasks_penguins_simple", hash = "mlr3data::mlr_tasks_penguins_simple")
task
}
4 changes: 2 additions & 2 deletions R/titanic.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ NULL

get_titanic_task = function() {
b = as_backend("titanic")
task = mlr3::TaskClassif$new("titanic", b, target = "survived", positive = "yes", label = "Titanic")
b$hash = task$man = "mlr3data::mlr_tasks_titanic"
task = mlr3::TaskClassif$new("titanic", b, target = "survived", positive = "yes")
task$override_info(man = "mlr3data::mlr_tasks_titanic", hash = "mlr3data::mlr_tasks_titanic")
task
}
9 changes: 9 additions & 0 deletions tests/test_data_sets.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,17 @@ stopifnot(nrow(moneyball) == 1232L, ncol(moneyball) == 15L)


if (requireNamespace("mlr3")) {
old_opts = options(
warnPartialMatchArgs = TRUE,
warnPartialMatchAttr = TRUE,
warnPartialMatchDollar = TRUE,
mlr3.on_deprecated_mlr3component = "error"
)

stopifnot(inherits(mlr3::tsk("kc_housing"), "TaskRegr"))
stopifnot(inherits(mlr3::tsk("titanic"), "TaskClassif"))
stopifnot(inherits(mlr3::tsk("optdigits"), "TaskClassif"))
stopifnot(inherits(mlr3::tsk("moneyball"), "TaskRegr"))

options(old_opts)
}