Skip to content

Commit ee62ca2

Browse files
committed
do not run tests on cran and fix broken URLs
1 parent ad2f8f7 commit ee62ca2

13 files changed

+71
-24
lines changed

DESCRIPTION

+1
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ Suggests:
254254
sda,
255255
sf,
256256
smoof,
257+
snow,
257258
sparseLDA,
258259
stepPlr,
259260
survAUC,

R/makeLearner.R

+9-8
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
#' `ntree = se.ntree`, the latter of which controls the number of trees in the
7373
#' individual random forests which are bootstrapped. The "noisy bootstrap" is
7474
#' executed when `se.ntree < ntree` which is less computationally expensive. A
75-
#' Monte-Carlo bias correction may make the latter option prefarable in many
75+
#' Monte-Carlo bias correction may make the latter option preferable in many
7676
#' cases. Defaults are `se.boot = 50` and `se.ntree = 100`.
7777
#'
7878
#' \item If `se.method = "sd"`, the default, the standard deviation of the
@@ -105,20 +105,21 @@
105105
#' the target feature in training data, respectively.
106106
#'
107107
#' The default method is \dQuote{mean} which corresponds to the ZeroR algorithm
108-
#' from WEKA, see <https://weka.wikispaces.com/ZeroR>.
108+
#' from WEKA.
109109
#'
110110
#' @section classif.featureless:
111111
#'
112112
#' Method \dQuote{majority} predicts always the majority class for each new
113-
#' observation. In the case of ties, one randomly sampled, constant class is predicted
114-
#' for all observations in the test set.
115-
#' This method is used as the default. It is very similar to the ZeroR classifier
116-
#' from WEKA (see <https://weka.wikispaces.com/ZeroR>). The only difference is
113+
#' observation. In the case of ties, one randomly sampled, constant class is
114+
#' predicted for all observations in the test set.
115+
#' This method is used as the default. It is very similar to the ZeroR
116+
#' classifier from WEKA. The only difference is
117117
#' that ZeroR always predicts the first class of the tied class values instead
118118
#' of sampling them randomly.
119119
#'
120-
#' Method \dQuote{sample-prior} always samples a random class for each individual test
121-
#' observation according to the prior probabilities observed in the training data.
120+
#' Method \dQuote{sample-prior} always samples a random class for each
121+
#' individual test observation according to the prior probabilities observed in
122+
#' the training data.
122123
#'
123124
#' If you opt to predict probabilities, the class probabilities always
124125
#' correspond to the prior probabilities observed in the training data.

R/measures.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ cindex = makeMeasure(
13751375
#' @references
13761376
#' H. Uno et al.
13771377
#' *On the C-statistics for Evaluating Overall Adequacy of Risk Prediction Procedures with Censored Survival Data*
1378-
#' Statistics in medicine. 2011;30(10):1105-1117. <https://doi.org/10.1002/sim.4154>.
1378+
#' Statistics in medicine. 2011;30(10):1105-1117. \doi{10.1002/sim.4154}.
13791379
cindex.uno = makeMeasure(
13801380
id = "cindex.uno", minimize = FALSE, best = 1, worst = 0,
13811381
properties = c("surv", "req.pred", "req.truth", "req.model", "req.task"),

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# mlr <img src="man/figures/logo.png" align="right" />
22

3-
Package website: [release](https://mlr.mlr-org.com/) | [dev](https://mlr.mlr-org.com/dev)
3+
Package website: [release](https://mlr.mlr-org.com/) | [dev](https://mlr.mlr-org.com/dev/)
44

55
Machine learning in R.
66

@@ -9,9 +9,9 @@ Machine learning in R.
99
[![tic](https://github.com/mlr-org/mlr/workflows/tic/badge.svg?branch=main)](https://github.com/mlr-org/mlr/actions)
1010
[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version-ago/mlr)](https://cran.r-project.org/package=mlr)
1111
[![cran checks](https://cranchecks.info/badges/worst/mlr)](https://cran.r-project.org/web/checks/check_results_mlr.html)
12-
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/mlr)](https://cran.rstudio.com/web/packages/mlr/index.html)
12+
[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/mlr)](https://cran.r-project.org/package=mlr)
1313
[![StackOverflow](https://img.shields.io/badge/stackoverflow-mlr-blue.svg)](https://stackoverflow.com/questions/tagged/mlr)
14-
[![lifecycle](https://img.shields.io/badge/lifecycle-retired-orange.svg)](https://www.tidyverse.org/lifecycle/#retired)
14+
[![lifecycle](https://img.shields.io/badge/lifecycle-retired-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html)
1515
[![codecov](https://codecov.io/gh/mlr-org/mlr/branch/main/graph/badge.svg)](https://codecov.io/gh/mlr-org/mlr)
1616

1717
<!-- badges: end -->
@@ -50,7 +50,7 @@ remotes::install_github("mlr-org/mlr")
5050

5151
## Citing {mlr} in publications
5252

53-
Please cite our [JMLR paper](http://jmlr.org/papers/v17/15-066.html) [[bibtex](http://www.jmlr.org/papers/v17/15-066.bib)].
53+
Please cite our [JMLR paper](https://jmlr.org/papers/v17/15-066.html) [[bibtex](https://www.jmlr.org/papers/v17/15-066.bib)].
5454

5555
Some parts of the package were created as part of other publications.
5656
If you use these parts, please cite the relevant work appropriately.

man/makeLearner.Rd

+9-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/measures.Rd

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat.R

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
library(testthat)
2-
test_check("mlr")
2+
if (identical(Sys.getenv("NOT_CRAN"), "true")) {
3+
set.seed(getOption("mlr.debug.seed"))
4+
test_check("mlr")
5+
}

tests/testthat/test_parallel_mpi.R

+11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
test_that("parallel resampling", {
33
skip_on_os("mac")
44
skip_on_ci()
5+
skip_on_cran()
6+
57
doit = function(mode, level) {
68
lrn = makeLearner("classif.rpart")
79
rdesc = makeResampleDesc("CV", iters = 2L)
@@ -20,6 +22,8 @@ test_that("parallel resampling", {
2022
test_that("parallel tuning", {
2123
skip_on_os("mac")
2224
skip_on_ci()
25+
skip_on_cran()
26+
2327
doit = function(mode, level) {
2428
lrn = makeLearner("classif.rpart")
2529
rdesc = makeResampleDesc("CV", iters = 2L)
@@ -40,6 +44,7 @@ test_that("parallel tuning", {
4044
test_that("parallel featsel", {
4145
skip_on_os("mac")
4246
skip_on_ci()
47+
skip_on_cran()
4348
doit = function(mode, level) {
4449
lrn = makeLearner("classif.rpart")
4550
rdesc = makeResampleDesc("CV", iters = 2L)
@@ -59,6 +64,8 @@ test_that("parallel featsel", {
5964
test_that("parallel exporting of options works", {
6065
skip_on_os("mac")
6166
skip_on_ci()
67+
skip_on_cran()
68+
6269
doit = function(mode, level) {
6370

6471
data = iris
@@ -82,6 +89,8 @@ test_that("parallel exporting of options works", {
8289
test_that("parallel partial dependence", {
8390
skip_on_os("mac")
8491
skip_on_ci()
92+
skip_on_cran()
93+
8594
doit = function(mode) {
8695
lrn = makeLearner("regr.rpart")
8796
fit = train(lrn, regr.task)
@@ -98,6 +107,8 @@ test_that("parallel partial dependence", {
98107
test_that("parallel ensembles", {
99108
skip_on_os("mac")
100109
skip_on_ci()
110+
skip_on_cran()
111+
101112
doit = function(mode, level) {
102113

103114
on.exit(parallelStop())

tests/testthat/test_surv_measures.R

+7-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ test_that("survival measures do not do stupid things", {
3434
})
3535

3636
test_that("setting measure pars works", {
37+
requirePackagesOrSkip("survAUC", default.method = "load")
38+
3739
mod = train("surv.rpart", wpbc.task)
3840
pred = predict(mod, wpbc.task)
3941

@@ -58,6 +60,8 @@ test_that("setting measure pars works", {
5860

5961
test_that("hand constructed tests", {
6062
requirePackagesOrSkip("Hmisc", default.method = "load")
63+
requirePackagesOrSkip("survAUC", default.method = "load")
64+
6165
n = 100
6266
time = sort(rexp(n, 0.1)) + 1
6367
data = data.frame(time = time, status = 1, x1 = order(time))
@@ -76,8 +80,10 @@ test_that("hand constructed tests", {
7680
expect_equal(unname(perf), c(1, 1, 0.99))
7781
})
7882

79-
8083
test_that("ibrier measure works with surv tasks", {
84+
requirePackagesOrSkip("survAUC", default.method = "load")
85+
requirePackagesOrSkip("pec", default.method = "load")
86+
8187
set.seed(getOption("mlr.debug.seed"))
8288
rin = makeResampleInstance(makeResampleDesc("CV", iters = 2), task = wpbc.task)
8389
lrn = makeLearner("surv.coxph", x = TRUE)

tests/testthat/test_tuneParams.R

+9
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ test_that("names for minimize are set correctly", {
1414
})
1515

1616
test_that("tuneParams with resample.fun", {
17+
cl =
18+
1719
lrn = makeLearner("classif.rpart")
1820
rdesc = makeResampleDesc("Holdout")
1921
ps = makeParamSet(
@@ -63,6 +65,7 @@ test_that("tuneParams with resample.fun", {
6365
})
6466

6567
test_that("tuneParams output works as documented", {
68+
cl =
6669
lrn = makeLearner("classif.ksvm")
6770
rdesc = makeResampleDesc("Holdout")
6871
ps = makeParamSet(
@@ -96,6 +99,8 @@ test_that("tuneParams output works as documented", {
9699
})
97100

98101
test_that("tuneParams output works as documented", {
102+
cl =
103+
99104
lrn = makeLearner("classif.ksvm")
100105
rdesc = makeResampleDesc("Holdout")
101106
ps = makeParamSet(
@@ -130,6 +135,8 @@ test_that("tuneParams output works as documented", {
130135

131136
test_that("tuning with a fixed ensemble methods and varying base methods works", {
132137

138+
cl =
139+
133140
# TODO: make it possible to choose arbitrary number of base.methods -> cannot
134141
# tune an argument of a param. We need to make makeDiscreteVectorParam more
135142
# flexible to allow more than one ensemble.method
@@ -161,6 +168,8 @@ test_that("tuning with a fixed ensemble methods and varying base methods works",
161168

162169
test_that("tuning with a fixed ensemble methods and varying base methods works", {
163170

171+
cl =
172+
164173
# TODO: choose arbitrary number of base.methods -> cannot tune an argument of
165174
# a param. We need to make makeDiscreteVectorParam more flexible. allow more
166175
# than one ensemble.method

tests/testthat/test_tune_tuneMBO.R

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
test_that("tuneMBO", {
3+
requirePackagesOrSkip("rgenoud", default.method = "load")
34
n.des = 8
45
n.iter = 2
56
res = makeResampleDesc("Holdout")

tests/testthat/test_tune_tuneParamsMultiCrit.R

+13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

22
test_that("tuneParamsMultiCrit", {
3+
requirePackagesOrSkip("emoa", default.method = "load")
4+
35
lrn = makeLearner("classif.rpart")
46
rdesc = makeResampleDesc("Holdout")
57
ps = makeParamSet(
@@ -75,6 +77,9 @@ test_that("tuneParamsMultiCrit", {
7577

7678

7779
test_that("tuneParamsMultiCrit works with low number of evals and dependencies", {
80+
81+
requirePackagesOrSkip("emoa", default.method = "load")
82+
7883
# we had a bug here triggered thru code in PH
7984
ps = makeParamSet(
8085
makeNumericParam("C", lower = -12, upper = 12, trafo = function(x) 2^x),
@@ -92,6 +97,8 @@ test_that("tuneParamsMultiCrit works with low number of evals and dependencies",
9297

9398
# FIXME: I am not sure how we can check wich value is imputed for the optimizer?
9499
test_that("y imputing works", {
100+
requirePackagesOrSkip("emoa", default.method = "load")
101+
95102
configureMlr(on.learner.error = "quiet")
96103
lrn = makeLearner("classif.__mlrmocklearners__2")
97104
rdesc = makeResampleDesc("Holdout")
@@ -110,6 +117,8 @@ test_that("y imputing works", {
110117
})
111118

112119
test_that("tuneParamsMultiCrit with budget", {
120+
requirePackagesOrSkip("emoa", default.method = "load")
121+
113122
lrn = makeLearner("classif.rpart")
114123
rdesc = makeResampleDesc("Holdout")
115124
ps = makeParamSet(
@@ -162,6 +171,7 @@ test_that("tuneParamsMultiCrit with budget", {
162171
})
163172

164173
test_that("plotTuneMultiCritResult works with pretty.names", {
174+
requirePackagesOrSkip("emoa", default.method = "load")
165175
lrn = makeLearner("classif.rpart")
166176
ps = makeParamSet(
167177
makeDiscreteParam("minsplit", values = c(5, 10))
@@ -174,6 +184,7 @@ test_that("plotTuneMultiCritResult works with pretty.names", {
174184
})
175185

176186
test_that("tuneParamsMultiCrit with resample.fun", {
187+
requirePackagesOrSkip("emoa", default.method = "load")
177188
lrn = makeLearner("classif.rpart")
178189
rdesc = makeResampleDesc("Holdout")
179190
ps = makeParamSet(
@@ -210,6 +221,8 @@ test_that("tuneParamsMultiCrit with resample.fun", {
210221
})
211222

212223
test_that("check n.objectives for MBO multi crit", {
224+
requirePackagesOrSkip("emoa", default.method = "load")
225+
213226
lrn = makeLearner("classif.rpart")
214227
rdesc = makeResampleDesc("Holdout")
215228
ps = makeParamSet(

tests/testthat/test_tune_tuneThreshold.R

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
test_that("tuneThreshold", {
3+
requirePackagesOrSkip("lhs", default.method = "load")
34

45
# binary classes, 1 th
56
lrn = makeLearner("classif.lda", predict.type = "prob")

0 commit comments

Comments
 (0)