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

- Add Paramtest for all learners and check for missing params #96

Merged
merged 5 commits into from
Apr 12, 2020

Conversation

pat-s
Copy link
Member

@pat-s pat-s commented Apr 11, 2020

  • CI switched to use {tic} to use the ParamTest the same way as in other learner repos.
  • .lintr config file added
  • Adding the ParamTest revealed the following missing params:

glmnet

  • keep
  • parallel
  • trace.it
  • foldid
  • alignment
  • grouped
  • offset

kknn

  • ykernel

lda

  • predict.prior
  • dimen

log_reg

  • singular.ok
  • x
  • y
  • model
  • etastart
  • mustart
  • start
  • offset
  • epsilon
  • maxit
  • trace
  • se.fit
  • dispersion

qda

  • predict.prior

ranger

  • max.depth
  • alpha
  • min.prop
  • regularization.factor
  • egularization.usedepth
  • seed
  • minprop
  • predict.all
  • se.method

svm

  • decision.values

xgboost

  • save_period
  • save_name
  • xgb_model
  • predleaf
  • predcontrib
  • approxcontrib
  • predinteraction
  • reshape
  • training

Here more are missing - however, all params passed via arg params cannot be checked against programatically :/

@lintr-bot
Copy link

R/LearnerClassifKKNN.R:67:1: style: Lines should not be more than 100 characters.

p = invoke(kknn::kknn, formula = model$formula, train = model$data, test = newdata, .args = model$pars)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerClassifRanger.R:64:1: style: Lines should not be more than 100 characters.

ParamFct$new("se.method", default = "infjack", levels = c("jack", "infjack"), tags = "predict")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrGlmnet.R:28:1: style: Lines should not be more than 100 characters.

ParamFct$new("family", default = "gaussian", levels = c("gaussian", "poisson"), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrGlmnet.R:32:1: style: Lines should not be more than 100 characters.

ParamFct$new("type.measure", levels = c("deviance", "class", "auc", "mse", "mae"), default = "deviance", tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrGlmnet.R:33:1: style: Lines should not be more than 100 characters.

ParamDbl$new("s", lower = 0, special_vals = list("lambda.1se", "lambda.min"), default = "lambda.1se", tags = "predict"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrKKNN.R:32:1: style: Lines should not be more than 100 characters.

ParamFct$new("kernel", levels = c("rectangular", "triangular", "epanechnikov", "biweight", "triweight", "cos", "inv", "gaussian", "rank", "optimal"), default = "optimal", tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrKKNN.R:61:1: style: Lines should not be more than 100 characters.

p = invoke(kknn::kknn, formula = model$formula, train = model$data, test = newdata, .args = model$pars)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrLM.R:68:1: style: Lines should not be more than 100 characters.

PredictionRegr$new(task = task, response = predict(self$model, newdata = newdata, se.fit = FALSE))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrRanger.R:63:1: style: Lines should not be more than 100 characters.

ParamInt$new("seed", default = NULL, special_vals = list(NULL), tags = c("train", "predict")),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrRanger.R:67:1: style: Lines should not be more than 100 characters.

ParamFct$new("se.method", default = "infjack", levels = c("jack", "infjack"), tags = "predict")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrRanger.R:133:1: style: Lines should not be more than 100 characters.

preds = mlr3misc::invoke(predict, self$model, data = newdata, type = self$predict_type, .args = pars)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrSVM.R:24:1: style: Lines should not be more than 100 characters.

ParamFct$new("type", default = "eps-regression", levels = c("eps-regression", "nu-regression"), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrSVM.R:25:1: style: Lines should not be more than 100 characters.

ParamFct$new("kernel", default = "radial", levels = c("linear", "polynomial", "radial", "sigmoid"), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrXgboost.R:31:1: style: Lines should not be more than 100 characters.

ParamFct$new("booster", default = "gbtree", levels = c("gbtree", "gblinear", "dart"), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrXgboost.R:49:1: style: Lines should not be more than 100 characters.

ParamDbl$new("missing", default = NA, tags = c("train", "predict"), special_vals = list(NA, NA_real_, NULL)),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrXgboost.R:57:1: style: Lines should not be more than 100 characters.

ParamInt$new("early_stopping_rounds", default = NULL, lower = 1L, special_vals = list(NULL), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrXgboost.R:59:1: style: Lines should not be more than 100 characters.

ParamFct$new("sample_type", default = "uniform", levels = c("uniform", "weighted"), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrXgboost.R:60:1: style: Lines should not be more than 100 characters.

ParamFct$new("normalize_type", default = "tree", levels = c("tree", "forest"), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrXgboost.R:64:1: style: Lines should not be more than 100 characters.

ParamFct$new("tree_method", default = "auto", levels = c("auto", "exact", "approx", "hist", "gpu_hist"), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrXgboost.R:65:1: style: Lines should not be more than 100 characters.

ParamFct$new("grow_policy", default = "depthwise", levels = c("depthwise", "lossguide"), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrXgboost.R:73:1: style: Lines should not be more than 100 characters.

ParamFct$new("feature_selector", default = "cyclic", levels = c("cyclic", "shuffle", "random", "greedy", "thrifty"), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/LearnerRegrXgboost.R:75:1: style: Lines should not be more than 100 characters.

ParamFct$new("predictor", default = "cpu_predictor", levels = c("cpu_predictor", "gpu_predictor"), tags = "train"),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/zzz.R:8:1: style: Lines should not be more than 100 characters.

#' More learners are available in the `mlr3learners` repository on Github (\url{https://github.com/mlr3learners}).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/zzz.R:9:1: style: Lines should not be more than 100 characters.

#' There also is a wiki page listing all currently available custom learners (\url{https://github.com/mlr-org/mlr3learners/wiki/Extra-Learners}).
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

R/zzz.R:10:1: style: Lines should not be more than 100 characters.

#' A guide on how to create custom learners is covered in the book: \url{https://mlr3book.mlr-org.com}.
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/testthat/helper.R:3:1: style: Lines should not be more than 100 characters.

​lapply(list.files(system.file("testthat", package = "mlr3"), pattern = "^helper.*\\.[rR]$", full.names = TRUE), source)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@pat-s pat-s changed the title Add Paramtest for all learners and check for missing params - Add Paramtest for all learners and check for missing params Apr 12, 2020
@pat-s pat-s merged commit b306111 into master Apr 12, 2020
@pat-s pat-s deleted the paramtest branch April 12, 2020 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants