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

introduce Aggregation class properties and clean up ResampleResult printer #1187

Merged
merged 2 commits into from
Aug 28, 2016

Conversation

berndbischl
Copy link
Sponsor Member

this addresses issue #1045
it became a lot longer than i had hoped.
summary of what i did:

  1. Aggregation objects now have properties. they define whether they need the trains set evals, test set evals, or both. this allows to generate an informative error msg for the NA problem in the issue.

  2. i removed the "mean" and "sd" display from the ResampleResult printer. this was kinda hacked in before, confusing as it used different aggregation functions, and also did not reliably work.
    it also nearly never provided more info but ate up extra lines in a useless manner.
    i printed the aggreated measure performance in a standard way instead.

  3. some tests

@berndbischl
Copy link
Sponsor Member Author

this is more or less a core change. so please review very carefully!

a = measure$aggr
p = a$properties
pred = rdesc$predict
p.allowed = if (all(c("req.train", "req.test") %in% p)) {
Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not setequal here?

Copy link
Sponsor Member Author

@berndbischl berndbischl Aug 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not setequal here?

because my code expresses what i want to say, and is more robust than setequal. consider that the aggregation properties might grow larger. and contain other stuff.

@larskotthoff
Copy link
Sponsor Member

Looks good to me, but somebody else should review as well.

@berndbischl
Copy link
Sponsor Member Author

Looks good to me, but somebody else should review as well.

thx + agree

@berndbischl
Copy link
Sponsor Member Author

@jakob-r @mllg @zmjones @schiffner
can somebody review so i can merge

@zmjones
Copy link
Contributor

zmjones commented Aug 28, 2016

looks good to me.

is there a reason for the expect_false -> is.na setup? could this ever be NaN or something other than a length 1 numeric?

@berndbischl
Copy link
Sponsor Member Author

is there a reason for the expect_false -> is.na setup? could this ever be NaN or something other than a length 1 numeric?

do you mean the code cleanup i did test_base_resample?
i simply cleaned up some (not so good) code here, which is unrelated.

resampleresult$aggr can be NA when the training or something else failed.
it is one of our "idioms" in tests to check that everything correctly ran through.

@zmjones
Copy link
Contributor

zmjones commented Aug 28, 2016

yes that is what i meant. then merge away! i fixed a grammatical error in the docs but that is it.

@berndbischl
Copy link
Sponsor Member Author

thx. someone pls merge when travis is done

@zmjones
Copy link
Contributor

zmjones commented Aug 28, 2016

should i wait for jenkins?

@larskotthoff larskotthoff merged commit d724419 into master Aug 28, 2016
@larskotthoff larskotthoff deleted the aggr_properties_and_ResampleResult_printer branch August 28, 2016 18:21
schiffner added a commit to mlr-archive/mlr-tutorial that referenced this pull request Aug 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants