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

mstop = 1 should be possible for non-cyclical fitting #22

Closed
hofnerb opened this issue Aug 29, 2016 · 18 comments
Closed

mstop = 1 should be possible for non-cyclical fitting #22

hofnerb opened this issue Aug 29, 2016 · 18 comments
Assignees
Labels

Comments

@hofnerb
Copy link
Member

hofnerb commented Aug 29, 2016

glmboostLSS(y ~ ., families = NBinomialLSS(), data = dat,
                     control = boost_control(mstop = 1), method = "outer")

currently gives the errror

Error in mboostLSS_fit(formula = formula, data = data, families = families,  :mstophas to be an integer larger than 2

and if one fits a larger model and reduces it to 1, one gets

Warning message:
In attr(x, "subset")(i) :
  Minimal number of iterations: 2 (at least one iteration for each distribution parameter)

Does this really make sense for non-cyclical models?

@hofnerb
Copy link
Member Author

hofnerb commented Aug 29, 2016

Why do we force update all boosting parameters in the first iteration? Is this really necessary? I know that we need to build up all mboost objects but couldn't we (and don't we have to) just use the best update already in this first step? (i.e. alway refit already the first step if necessary???)

@ja-thomas
Copy link
Member

In the current implementation we have to initialize all models before the noncyclical model can run.
This was something that isn't ideal when I implemented it initially.

But in general you are completely right that it should work like you suggested. I'm not sure how easy it would be to change it like that. This is something that I would like to solve together with #24.

@ja-thomas
Copy link
Member

@hofnerb is there a way to create a mboost object with 0 iterations?

So basically a intercept only model, with mstop = 0

@hofnerb
Copy link
Member Author

hofnerb commented Jan 26, 2017

No, this is currently not possible. We should have a look at mboost to fix this. Shouldn't we?

@ja-thomas
Copy link
Member

That's imo the smartest way to fix this, I'll open an issue there

@hofnerb
Copy link
Member Author

hofnerb commented Jan 26, 2017

Acutally this might be pretty easy. I just have a look at it. We simply might skip this line. Just need to make sure that no unwanted side effects are induced.

@hofnerb
Copy link
Member Author

hofnerb commented Jan 26, 2017

Should be working now. Both, subsetting (mstop(mod) <- 0) and setting mstop = 0 initially.

Please go ahead (and let me now if you spot an open issue regarding mstop = 0)

@ja-thomas
Copy link
Member

Awesome! Thanks a lot

@hofnerb
Copy link
Member Author

hofnerb commented Jan 27, 2017

@ja-thomas I hope you always use risk(mod) and never mod$risk. See boost-R/mboost#66 for possible future problems.

I think we should also allow mstop = 0 in gamboostLSS and hence also cvrisk starting from 0.

@hofnerb
Copy link
Member Author

hofnerb commented Jan 27, 2017

I modified risk(mod) such that it now returns a vector of length mstop + 1 as it includes the risk for the offset model.

@ja-thomas
Copy link
Member

So I changed the behavior of gamboostLSS to work with mstop=0 in #31. Might not be perfect yet, but seems to work in principle.

It just seems that the focus on location parameter is even stronger.

For the old version mstop = 90/10 on the cars dataset for the new version after 700 iterations 678/22 while for mstop=600 it is still 600/0.

There shouldn't be such a huge difference I think.

My current theory is that the initialization is wrong (thats why I opened #69 in mboost.

@hofnerb
Copy link
Member Author

hofnerb commented Feb 13, 2017

Did you also have a look at coefficients and/or coefficient paths? It could be that by forcing mstop = 1, we need the next iterations to revert this effect, which wouldn't be necessary if it wasn't included in the first place.

@hofnerb
Copy link
Member Author

hofnerb commented Feb 13, 2017

@ja-thomas Please also check that mstop = 0 etc. works, also subsetting and increasing afterwards (see also #33). Perhaps you can recycle (some of) the code from boost-R/mboost:regtest-gamboost.R

@ja-thomas
Copy link
Member

ja-thomas commented Feb 16, 2017

... It could be that by forcing mstop = 1, we need the next iterations to revert this effect, which wouldn't be necessary if it wasn't included in the first place.

Hm, so you actually mean that now we are doing the right thing...

EDIT: You may be right, as the tendency of only using mu is not present when center = FALSE...

@hofnerb
Copy link
Member Author

hofnerb commented Feb 16, 2017

which means that you think that with center = FALSE we also need to correct the wrong model?

@ja-thomas
Copy link
Member

Ok there is definitely some more testing required.

In principle everything seems to work, it is just highly depending on the dataset. Let's see what is going to happen in some simulated scenarios.

@hofnerb
Copy link
Member Author

hofnerb commented Apr 25, 2017

@ja-thomas This should be working in devel, now?

@hofnerb
Copy link
Member Author

hofnerb commented Apr 26, 2017

Seems like it. Tests are included in tests/regtest-noncyclic_fitting.R

@hofnerb hofnerb closed this as completed Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants