8000 Remove warning when `NA` is set as default for a param? · Issue #217 · mlr-org/ParamHelpers · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Remove warning when NA is set as default for a param? #217
Closed
@pat-s

Description

@pat-s

In

ParamHelpers/R/aParam.R

Lines 127 to 129 in 391057d

# FIXME: Do we need to check for NA here? Hopefully not because this might occur in mlr?
if (has.default && isScalarNA(default))
warningf("NA used as a default value for learner parameter %s.\nParamHelpers uses NA as a special value for dependent parameters.", id)

This comes up for learner xgboost in mlr and is quite annoying in the tests.

Has this fact ever triggered a serious problem? I don't think that the warning printed to the user is very helpful. It is tailored to devs and might confuse the user (the user can't do anything about it anyways). Especially because it comes up for learner xgboost (learner param "missing" has NA as default) it is somewhat important to get rid of it quickly.

makeLearner('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.
Learner classif.xgboost from package xgboost
Type: classif
Name: eXtreme Gradient Boosting; Short name: xgboost
Class: classif.xgboost
Properties: twoclass,multiclass,numerics,prob,weights,missings,featimp
Predict-Type: response
Hyperparameters: nrounds=1,verbose=0

@jakob-r @berndbischl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0