-
-
Notifications
You must be signed in to change notification settings - Fork 405
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
Expression handling #1126
Expression handling #1126
Conversation
Thanks Pascal.
|
Ok, I'll do that :)
That's a decision we've made with @mllg and @berndbischl. The main reason is that now the user can use any expression which takes any information from the task. I mean, you probably wouldn't want to do
The tests already contain hand-constructed expressions, e.g. the rpart with hand-constructed hyperparameters.. The reason for having the randomForest in there, is actually to check whether it also works with the parameter setup that is defined from our side within the definition of the learner. And if those values are changed by someone of us, well then that person should also update the unit tests accordingly. Right? |
> Why is the task itself in the dictionary?
That's a decision we've made with @mllg and @berndbischl. The main reason is
that now the user can use any expression which takes any information from the
task. I mean, you probably wouldn't want to do `expression(task)` but
`expression(task$...)`.
Ok, but then this should be documented as well.
> In the unit tests, instead of checking the values for randomForest (which
> are specified somewhere else), could you please use a hand-constructed
> expression? Otherwise this test will fail for no good reason if the values
> in randomForest are changed.
The tests already contain hand-constructed expressions, e.g. the rpart with
hand-constructed hyperparameters.. The reason for having the randomForest in
there, is actually to check whether it also works with the parameter setup
that is defined from our side within the definition of the learner. And if
those values are changed by someone of us, well then that person should also
update the unit tests accordingly. Right?
I don't see the benefit of testing something external -- what does this test
that the hand-constructed example doesn't test? It introduces unnecessary
coupling and I'm sure that we'll always forget this and then have to come back
to a PR later and fix things.
|
the documentation has been updated.. please review again and then merge ;) |
Reviewed. Everything okay. @berndbischl -> ok to merge? |
@berndbischl: ping.. |
you do know that i am on holiday right? |
yes, and I see your working on all other ends of the package during your holiday ;) |
evaluateParset should be called evaluateParamSet. We have to be consistent with the names |
Then, we're mixing up the names from ParamHelpers (evaluateParamSet) and mlr (evaluateParSet). But if that's the only thing that you don't like, I can fix that tomorrow.. |
i am on holiday pls wait at least until monday. |
In case that you haven't found it already: mlr-archive/mlr-tutorial#49 |
Looks good to me. |
@berndbischl ping ping ping |
@berndbischl what's your status on this one? i mean ping, ping, ping ;) |
# Conflicts: # DESCRIPTION # R/Learner_properties.R # tests/testthat/test_base_measures.R
Test fail because of roxygen2 6.0.0 |
@berndbischl please review |
@berndbischl ping |
1 similar comment
@berndbischl ping |
@@ -31,6 +31,10 @@ | |||
train = function(learner, task, subset, weights = NULL) { | |||
learner = checkLearner(learner) | |||
assertClass(task, classes = "Task") | |||
if (hasExpression(learner)) { | |||
dict = getTaskDictionary(task = task) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dict
should somehow contain information about subset
. The learner only sees the subset task, and probably expects the parameters to behave accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would assume that the task is already subsetted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subsetting happens in trainLearner
(e.g.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course. I remember... what I don't remember is the motivation behind this though.
All reviews were postive. @mb706 comment can be implemented later in another PR. |
@jakob-r @mllg if thats the case, that creates invalid results. b) this is a base change. who where the 2 core members who reviewed positively? |
@jakob-r
what do you think happens now to people who use that code, and generate results from it? will revert now |
R/evaluateParamExpressions.R
In other words this example just assumes something that is never mentioned in the documentation. |
we can discuss this on hangout, but you cannot be serious |
maybe as reviewer it is also your obligation to think about whether the docs make sense? whether the semantics are good and proper? do you want to argue they are, here? that the example i posted is OK? you would like to have that behavior in your own experiments? that the defaults in the other underlying packages work this way? |
This PR allows to finally use task dependent expressions in the learner (see #767).