Skip to content

expressions in learner params #767

@kerschke

Description

@kerschke

As mentioned in PR #82 from ParamHelpers I started to use expressions within the mlr learners. The first steps have already been made, as you can see here.
In general, it is now possible to define expressions within the parameters of a learner. However, due to the high complexity, this now raises new issues on other ends of mlr. Here are some problems that came up:

  • weightedClassWrapper did not update the learner to the task; why does this not work? I mean, trainLearner.WeightedClassesWrapper internally calls train, which actually adapts the learner
  • in test_base_Learner.R the following call fails expect_error(makeLearner("classif.__mlrmocklearners__5"), "used 'expression'"), because PH now wants to have "a" in its dictionary (because parameter "b" requires expression(a == "x")).. do you have an idea, how to avoid this?

There are probably a lot more bugs coming up afterwards, but I thought it's best to start at some point and tackle them step-by-step..

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions