Skip to content

Commit faa2e38

Browse files
committed
common base class
1 parent 49c0a73 commit faa2e38

File tree

11 files changed

+30
-18
lines changed

11 files changed

+30
-18
lines changed

.lintr

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ linters: linters_with_defaults(
55
object_name_linter = object_name_linter(c("snake_case", "CamelCase")), # only allow snake case and camel case object names
66
cyclocomp_linter = NULL, # do not check function complexity
77
commented_code_linter = NULL, # allow code in comments
8-
line_length_linter = line_length_linter(120)
8+
line_length_linter = line_length_linter(120),
9+
indentation_linter = indentation_linter(indent = 2, hanging_indent_style = "never")
910
)
1011

DESCRIPTION

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ Depends:
2626
R (>= 3.1.0)
2727
Suggests:
2828
mlr3 (>= 0.13.3)
29+
Remotes:
30+
mlr-org/mlr3misc@common_baseclass,
31+
mlr-org/mlr3@common_baseclass
2932
Encoding: UTF-8
3033
LazyData: true
3134
LazyDataCompression: xz

R/ames_housing.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ NULL
1818

1919
get_ames_housing_task = function() {
2020
b = as_backend("ames_housing")
21-
task = mlr3::TaskRegr$new("ames_housing", b, target = "Sale_Price", label = "Ames House Sales")
22-
b$hash = task$man = "mlr3data::mlr_tasks_ames_housing"
21+
task = mlr3::TaskRegr$new("ames_housing", b, target = "Sale_Price")
22+
task$override_info(man = "mlr3data::mlr_tasks_ames_housing", hash = "mlr3data::mlr_tasks_ames_housing")
2323
task
2424
}

R/bike_sharing.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ NULL
2424

2525
get_bike_sharing_task = function() {
2626
b = as_backend("bike_sharing")
27-
task = mlr3::TaskRegr$new("bike_sharing", b, target = "count", label = "Bike Sharing Demand")
28-
b$hash = task$man = "mlr3data::mlr_tasks_bike_sharing"
27+
task = mlr3::TaskRegr$new("bike_sharing", b, target = "count")
28+
task$override_info(man = "mlr3data::mlr_tasks_bike_sharing", hash = "mlr3data::mlr_tasks_bike_sharing")
2929
task
3030
}

R/ilpd.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ NULL
2323

2424
get_ilpd_task = function() {
2525
b = as_backend("ilpd")
26-
task = mlr3::TaskClassif$new("ilpd", b, target = "diseased", positive = "yes", label = "Indian Liver Patient Data")
27-
b$hash = task$man = "mlr3data::mlr_tasks_ilpd"
26+
task = mlr3::TaskClassif$new("ilpd", b, target = "diseased", positive = "yes")
27+
task$override_info(man = "mlr3data::mlr_tasks_ilpd", hash = "mlr3data::mlr_tasks_ilpd")
2828
task
2929
}

R/kc_housing.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ NULL
2828

2929
get_kc_housing_task = function() {
3030
b = as_backend("kc_housing")
31-
task = mlr3::TaskRegr$new("kc_housing", b, target = "price", label = "King County House Sales")
32-
b$hash = task$man = "mlr3data::mlr_tasks_kc_housing"
31+
task = mlr3::TaskRegr$new("kc_housing", b, target = "price")
32+
task$override_info(man = "mlr3data::mlr_tasks_kc_housing", hash = "mlr3data::mlr_tasks_kc_housing")
3333
task
3434
}

R/moneyball.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ NULL
2525

2626
get_moneyball_task = function() {
2727
b = as_backend("moneyball")
28-
task = mlr3::TaskRegr$new("moneyball", b, target = "rs", label = "Major League Baseball Statistics")
29-
b$hash = task$man = "mlr3data::mlr_tasks_moneyball"
28+
task = mlr3::TaskRegr$new("moneyball", b, target = "rs")
29+
task$override_info(man = "mlr3data::mlr_tasks_moneyball", hash = "mlr3data::mlr_tasks_moneyball")
3030
task
3131
}

R/optdigits.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ NULL
3030

3131
get_optdigits_task = function() {
3232
b = as_backend("optdigits")
33-
task = mlr3::TaskClassif$new("optdigits", b, target = "binaryclass", positive = "P",
34-
label = "Optical Recognition of Handwritten Digits")
35-
b$hash = task$man = "mlr3data::mlr_tasks_optdigits"
33+
task = mlr3::TaskClassif$new("optdigits", b, target = "binaryclass", positive = "P")
34+
task$override_info(man = "mlr3data::mlr_tasks_optdigits", hash = "mlr3data::mlr_tasks_optdigits")
3635
task
3736
}

R/penguins_simple.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ NULL
2929

3030
get_penguins_simple_task = function() {
3131
b = as_backend("penguins_simple")
32-
task = mlr3::TaskClassif$new("penguins", b, target = "species", label = "Simplified Palmer Penguins")
33-
b$hash = task$man = "mlr3data::mlr_tasks_penguins_simple"
32+
task = mlr3::TaskClassif$new("penguins", b, target = "species")
33+
task$override_info(man = "mlr3data::mlr_tasks_penguins_simple", hash = "mlr3data::mlr_tasks_penguins_simple")
3434
task
3535
}

R/titanic.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ NULL
2828

2929
get_titanic_task = function() {
3030
b = as_backend("titanic")
31-
task = mlr3::TaskClassif$new("titanic", b, target = "survived", positive = "yes", label = "Titanic")
32-
b$hash = task$man = "mlr3data::mlr_tasks_titanic"
31+
task = mlr3::TaskClassif$new("titanic", b, target = "survived", positive = "yes")
32+
task$override_info(man = "mlr3data::mlr_tasks_titanic", hash = "mlr3data::mlr_tasks_titanic")
3333
task
3434
}

0 commit comments

Comments
 (0)