title: What does the warning "NA used as a default value for learner parameter missing" mean in mlr?
body: <p>I am running a classification xgboost via the mlr package. I have missing values in my data, which I would like to preserve (that is, I would like to keep these observations and I would like to avoid imputation). I understand that the xgboost implementation in mlr can handle missing values. However, I do not understand the warning provided by mlr's makeLearner function.</p>
  
  <p>I have tried to read the documentation and have found this warning throughout other people's code. But I have not seen the warning addressed in a way that makes sense to me.</p>
  
  <p>For example, I have read this discussion of the warning but it did not clarify things for me:
  <a href="https://github.com/mlr-org/mlr/pull/1225" rel="nofollow noreferrer">https://github.com/mlr-org/mlr/pull/1225</a></p>
  
  <p>The warning appears when calling the makeLearner function:</p>
  
  <pre><code>xgb_learner &lt;- makeLearner(
    "classif.xgboost",
    predict.type = "prob",
    par.vals = list(
      objective = "binary:logistic",
      eval_metric = "error",
      nrounds = 200,
      missing = NA,
      max_depth = 6,
      eta = 0.1,
      gamma = 5,
      colsample_bytree = 0.5,
      min_child_weight = 1,
      subsample = 0.7
  
    )
  )
  Warning in makeParam(id = id, type = "numeric", learner.param = TRUE, lower = lower,  :
    NA used as a default value for learner parameter missing.
  ParamHelpers uses NA as a special value for dependent parameters.
  </code></pre>
  
  <p>My missing values are currently coded as missing values (ie, NA). It is clear that R recognizes them as such from:</p>
  
  <pre><code>&gt; sum(is.na(training$day))
  [1] 58
  </code></pre>
  
  <p>From the getParamSet function, it seems that the parameter <em>missing</em> takes numeric values from -Inf to Inf. Thus, perhaps NA is not a valid value?</p>
  
  <pre><code>&gt; getParamSet("classif.xgboost")
  Warning in makeParam(id = id, type = "numeric", learner.param = TRUE, lower = lower,  :
    NA used as a default value for learner parameter missing.
  ParamHelpers uses NA as a special value for dependent parameters.
                                  Type  len             Def               Constr Req Tunable Trafo
  booster                     discrete    -          gbtree gbtree,gblinear,dart   -    TRUE     -
  watchlist                    untyped    -          &lt;NULL&gt;                    -   -   FALSE     -
  eta                          numeric    -             0.3               0 to 1   -    TRUE     -
  gamma                        numeric    -               0             0 to Inf   -    TRUE     -
  max_depth                    integer    -               6             1 to Inf   -    TRUE     -
  min_child_weight             numeric    -               1             0 to Inf   -    TRUE     -
  subsample                    numeric    -               1               0 to 1   -    TRUE     -
  colsample_bytree             numeric    -               1               0 to 1   -    TRUE     -
  colsample_bylevel            numeric    -               1               0 to 1   -    TRUE     -
  num_parallel_tree            integer    -               1             1 to Inf   -    TRUE     -
  lambda                       numeric    -               1             0 to Inf   -    TRUE     -
  lambda_bias                  numeric    -               0             0 to Inf   -    TRUE     -
  alpha                        numeric    -               0             0 to Inf   -    TRUE     -
  objective                    untyped    - binary:logistic                    -   -   FALSE     -
  eval_metric                  untyped    -           error                    -   -   FALSE     -
  base_score                   numeric    -             0.5          -Inf to Inf   -   FALSE     -
  max_delta_step               numeric    -               0             0 to Inf   -    TRUE     -
  missing                      numeric    -                          -Inf to Inf   -   FALSE     -
  
  </code></pre>
  
  <p>Do I need to recode these as a specific value that I then pass to mlr (through missing = [specific value] in makeLearner)? Do something else? Or is this warning not a cause for concern?</p>
  
  <p>Thanks so very much for any clarification.</p>