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

Refactor noncyclical fitting code #31

Merged
merged 21 commits into from
Apr 4, 2017
Merged

Refactor noncyclical fitting code #31

merged 21 commits into from
Apr 4, 2017

Conversation

ja-thomas
Copy link
Member

@ja-thomas ja-thomas commented Jan 25, 2017

Start of the refactoring for the noncylical fitting to make it better readable, easier to maintain and hopefully easier to fix #26 #22 and #21

We switch back to only one iBoost function with an additional method argument

Status:

@ja-thomas
Copy link
Member Author

The main problem is that the code for the outer method is still pretty terrible because mboost just isn't made to be updated based on a different criterion (e.g. not on the L2 loss on the gradient, but on the real loss function...). I don't really see a way to make that really nice.

Maybe we should move the outer version to an experimental branch and recommend the usage of the inner version which we can release soon. Not the ideal solution but maybe the most stable.

@hofnerb what do you think?

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 80.813% when pulling c865ee7 on refactor_noncyc into 0d94a46 on devel.

@hofnerb
Copy link
Member

hofnerb commented Jan 25, 2017

Puh, tough question. In principle ok (as we prefer the inner version anyway for computational reasons; Am I right?).

However, one remaining problem would be that we cannot update the simulations for both the inner and the outer version with this solution.

  • Do you see any chance to include the outer version in the current code (in the near future)?
  • Might it be an option to change the code such that we only provide a cyclic and one non-cyclic function (i.e., the inner version) forever? This might require some changes in the paper (i.e. we would need to state that we considered the outer version but do not further pursue this version).

@ja-thomas
Copy link
Member Author

Puh, tough question. In principle ok (as we prefer the inner version anyway for computational reasons).

However, one remaining problem would be that we cannot update the simulations for both the inner and the outer version with this solution.

This is indeed a problem.

Do you see any chance to include the outer version in the current code (in the near future)?

So in this PR the outer version is still present, but it is quite ugly/hacky.

Might it be an option to change the code such that we only provide a cyclic and one non-cyclic function (i.e., the inner version) forever? This might require some changes in the paper (i.e. we would need to state that we considered the outer version but do not further pursue this version).

I would actually prefer that solution. We can still keep the outer version in an experimental version.
The changes in the paper shouldn't be too large as the stabsel benchmarks use the inner version anyways.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 5b5190d on refactor_noncyc into ** on devel**.

@ja-thomas
Copy link
Member Author

Travis passed 🎉🎉🎉🎉

@ja-thomas
Copy link
Member Author

@hofnerb do you have any idea why appveyor is failing?

The test is running on my local machine and Travis is passing as well.

(appveyor in the master is currently failing as well, but that seems to be a different error)

@hofnerb
Copy link
Member

hofnerb commented Feb 20, 2017

I think (and what I've seen from the appveyor config) that appveyor checks with mboost from CRAN. Can you run the check locally with mboost/CRAN and see if you get the same errors? If so, please go ahead :)

[but please see that you fix the open issues (again) such as non-visible bindings, to wide manual pages, ...; this can also be done AFTER merging]

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling de4be0d on refactor_noncyc into ** on devel**.

@hofnerb
Copy link
Member

hofnerb commented Feb 28, 2017

All checks are successful now. There is one open issue left:

  • checking R code for possible problems ... NOTE
    mboostLSS_fit : iBoost: no visible global function definition for
    'ngradient'
    mboostLSS_fit : iBoost: no visible binding for global variable 'y'
    mboostLSS_fit : : no visible binding for '<<-' assignment to
    'combined_risk'
    mboostLSS_fit : : no visible binding for global variable
    'combined_risk'
    Undefined global functions or variables:
    combined_risk ngradient y

I think this is a consequence of evalq() within the code. Does this really help fixing speed issues? If so, how could we get rid of the NOTE in a sensible way? Can you please investigate that, @ja-thomas?

Please

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 86ebeb2 on refactor_noncyc into ** on devel**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 86ebeb2 on refactor_noncyc into ** on devel**.

@ja-thomas
Copy link
Member Author

ja-thomas commented Mar 29, 2017

I think this is a consequence of evalq() within the code. Does this really help fixing speed issues? If so, how could we get rid of the NOTE in a sensible way? Can you please investigate that, @ja-thomas?

Hm, in my benchmarks evalq seemed slightly faster. The biggest advantage in my point of view that the code is much more readable with evalq instead of accessing the environments by hand all the time.

EDIT: A call to global_variables() in AAA.R helps to resolves almost all Notes (see: http://stackoverflow.com/questions/9439256/how-can-i-handle-r-cmd-check-no-visible-binding-for-global-variable-notes-when)
One note is still the global assignment for combined_risk

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 4c2d159 on refactor_noncyc into ** on devel**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6309410 on refactor_noncyc into ** on devel**.

@ja-thomas ja-thomas changed the title Refactor noncyclical fitting code [NOT DONE, DO NOT MERGE] Refactor noncyclical fitting code Mar 29, 2017
@hofnerb hofnerb merged commit bb9a1da into devel Apr 4, 2017
@hofnerb hofnerb deleted the refactor_noncyc branch April 19, 2017 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants